diff --git a/build.zig b/build.zig index a5209f5..15b2ab6 100644 --- a/build.zig +++ b/build.zig @@ -429,12 +429,6 @@ pub fn ldcBuildStep(b: *Build, options: DCompileStep) !*RunStep { try cmds.append("-link-defaultlib-shared"); } - // C include path - for (lib_sokol.root_module.include_dirs.items) |include_dir| { - const path = include_dir.path_system.getPath(b); - try cmds.append(b.fmt("-P-I{s}", .{path})); - } - // library paths for (lib_sokol.root_module.lib_paths.items) |libpath| { if (libpath.path.len > 0) // skip empty paths diff --git a/src/sokol/imgui.d b/src/sokol/imgui.d index 36c0e6b..0a5554d 100644 --- a/src/sokol/imgui.d +++ b/src/sokol/imgui.d @@ -3,8 +3,7 @@ module sokol.imgui; import core.stdc.stdint; -import core.stdc.stdio; -import core.stdc.stdarg; +import core.stdc.stdarg : va_list; import sapp = sokol.app; import sg = sokol.gfx; @@ -1493,7 +1492,16 @@ struct StbTexteditRow int num_chars; } -alias ImFileHandle = _IO_FILE*; +static if({ + version(WebAssembly) return false; + else version(WASI) return false; + else return true; +}){ + import core.stdc.stdio: FILE; + alias ImFileHandle = FILE*; +}else{ + alias ImFileHandle = void*; +} struct ImVec1 {