diff options
Diffstat (limited to 'vk-cube')
| -rw-r--r-- | vk-cube/vk-cube.c | 8 |
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 |