diff --git a/build.zig b/build.zig index 8ab2cbe..bd273f6 100644 --- a/build.zig +++ b/build.zig @@ -105,19 +105,20 @@ pub fn package( zgui_c_cpp.linkSystemLibraryName("dwmapi"); }, .sdl2_opengl3 => { - if (target.isWindows()) blk: { - // see: https://github.com/MasterQ32/SDL.zig/blob/37f4ba9e31bea895fa19ef8b90d1f51111e52e67/Sdk.zig#L182-L199 + // if (target.isWindows()) blk: { + // // see: https://github.com/MasterQ32/SDL.zig/blob/37f4ba9e31bea895fa19ef8b90d1f51111e52e67/Sdk.zig#L182-L199 - zgui_c_cpp.addVcpkgPaths(if (args.options.shared) .dynamic else .static) catch break :blk; - const path = zgui_c_cpp.vcpkg_bin_path orelse break :blk; + // zgui_c_cpp.addVcpkgPaths(if (args.options.shared) .dynamic else .static) catch break :blk; + // const path = zgui_c_cpp.vcpkg_bin_path orelse break :blk; - const src_path = std.fs.path.join(b.allocator, &.{ path, "SDL2.dll" }) catch @panic("out of memory"); + // const src_path = std.fs.path.join(b.allocator, &.{ path, "SDL2.dll" }) catch @panic("out of memory"); - std.fs.cwd().access(src_path, .{}) catch break :blk; + // std.fs.cwd().access(src_path, .{}) catch break :blk; - // we found SDL2.dll - b.installBinFile(src_path, "SDL2.dll"); - } + // std.log.info("path: {s}", .{src_path}); + // // we found SDL2.dll + // b.installBinFile(src_path, "SDL2.dll"); + // } zgui_c_cpp.linkSystemLibrary("SDL2"); diff --git a/libs/imgui/backends/imgui_impl_sdl.cpp b/libs/imgui/backends/imgui_impl_sdl.cpp index 53ef3ed..d63c6e4 100644 --- a/libs/imgui/backends/imgui_impl_sdl.cpp +++ b/libs/imgui/backends/imgui_impl_sdl.cpp @@ -67,8 +67,13 @@ #include "imgui_impl_sdl.h" // SDL -#include -#include +#if defined(__WIN32__) + #include + #include +#else + #include + #include +#endif #if defined(__APPLE__) #include