summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-06-01 09:16:11 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-06-01 09:16:11 -0500
commit3500f37f7629ff902c14df20e11632e974571c5d (patch)
treef44134928db2d601b5934b1a11e18196af96bc94
parent59b0da2dd45261695ee32662847277750c2f4e9a (diff)
-rw-r--r--vk-cube/vk-cube.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vk-cube/vk-cube.c b/vk-cube/vk-cube.c
index 95661d8..9be1eb7 100644
--- a/vk-cube/vk-cube.c
+++ b/vk-cube/vk-cube.c
@@ -26,8 +26,13 @@
#include <vulkan/vulkan.h>
#include <assert.h>
+#include <stdio.h>
#include <stdlib.h>
+#if defined(_WIN32)
+# include <windows.h>
+#endif
+
#if defined(__APPLE__) || defined(__linux__)
# include <unistd.h>
#endif
@@ -144,6 +149,9 @@ int main(int argc, const char **argv)
printf("Setting working directory: %s\n", exe_dir);
// I wish the SDL devs were pragmatic enough to add SDL_SetCurrentDirectory():
// https://github.com/libsdl-org/SDL/issues/9110
+#if defined(_WIN32)
+ SetCurrentDirectory(exe_dir);
+#endif
#if defined(__APPLE__) || defined(__linux__)
chdir(exe_dir);
#endif