diff --git a/build.zig b/build.zig index a8de463..90a4c66 100644 --- a/build.zig +++ b/build.zig @@ -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, @@ -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); diff --git a/game/app.zig b/game/app.zig index d08660e..5ea197b 100644 --- a/game/app.zig +++ b/game/app.zig @@ -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; diff --git a/libs/zig-bass b/libs/zig-bass index b783c11..22089da 160000 --- a/libs/zig-bass +++ b/libs/zig-bass @@ -1 +1 @@ -Subproject commit b783c11a55a1d94fc6de64b32b1b9453134af69b +Subproject commit 22089daddd7c06778c30af80910572a8df0dd31d