Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 21, 2024
1 parent 6d8ecce commit 4b24405
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 0 additions & 6 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions src/sokol/imgui.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 4b24405

Please sign in to comment.