Skip to content

Commit

Permalink
windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Mar 7, 2024
1 parent 09f333c commit 2622c98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub fn build(b: *std.Build) !void {
const zig_bass = b.addModule("bass", .{
.root_source_file = .{ .path = root_path ++ "libs/zig-bass/src/bass.zig" },
});
zig_bass.addIncludePath(.{ .path = root_path ++ "libs/zig-bass/src" });

const stb_truetype = b.addModule("stb_truetype", .{
.optimize = optimize,
Expand Down Expand Up @@ -60,7 +61,7 @@ pub fn build(b: *std.Build) !void {
bass.linkBass(app_module);
bass.installBass(b, target.result);

app.compile.addIncludePath(.{ .path = root_path ++ "libs/zig-bass/src" });
app_module.addIncludePath(.{ .path = root_path ++ "libs/zig-bass/src" });

{ //iconv
const iconv_lib = iconv.createIconv(b, target, optimize);
Expand Down
3 changes: 2 additions & 1 deletion game/app.zig
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ pub fn init(app: *App) !void {
};
std.debug.print("loaded {d} maps!\n", .{app.map_list.len});

//On the DirectSound API, we should to pass the HWND into Bass so that windows will link the audio stream to the window
const bass_window_ptr: usize = if (builtin.os.tag == .windows)
core.nativeWindowWin32()
@intFromPtr(core.nativeWindowWin32())
else
0;

Expand Down
2 changes: 1 addition & 1 deletion libs/zig-bass
Submodule zig-bass updated 1 files
+0 −9 build.zig

0 comments on commit 2622c98

Please sign in to comment.