From b5140b780170bc4d6f2e6ed9a50319f9165b0a77 Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Fri, 10 Jul 2026 00:00:41 +0500 Subject: Windows fix --- .gitignore | 1 + build.zig | 8 ++++++++ src/scenes/sceneManager.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c2a41e2..f2ca29b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ zig-out .zig-cache game.a +raylib diff --git a/build.zig b/build.zig index ef10804..b5bbf33 100644 --- a/build.zig +++ b/build.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const builtin = @import("builtin"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); @@ -23,6 +24,13 @@ pub fn build(b: *std.Build) void { } }); + if (builtin.target.os.tag == .windows) { + // If you are building on windows you need to provide your own + // raylib. Put it in the raylib dir + root.addLibraryPath(b.path("raylib/lib/")); + root.addIncludePath(b.path("raylib/include/")); + } + root.linkSystemLibrary("raylib", .{.needed = true}); root.addIncludePath(b.path("include/")); diff --git a/src/scenes/sceneManager.c b/src/scenes/sceneManager.c index bb70864..8d4c4e7 100644 --- a/src/scenes/sceneManager.c +++ b/src/scenes/sceneManager.c @@ -3,7 +3,7 @@ #include Scene **sceneStack = NULL; -uint sceneStackDepth = 0; +size_t sceneStackDepth = 0; Scene *getCurrentScene() { if (sceneStackDepth == 0) return false; -- cgit v1.3