From a376fba285f4bc71f0ce3552b88f0a35ef29a828 Mon Sep 17 00:00:00 2001
From: David Gonzalez Martin <davidgm94.work@protonmail.com>
Date: Fri, 27 Dec 2024 09:33:51 -0600
Subject: [PATCH] Fix Windows compilation

---
 bootstrap/include/std/base.h | 1 +
 bootstrap/std/window.c       | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bootstrap/include/std/base.h b/bootstrap/include/std/base.h
index e2beae8..54d4c67 100644
--- a/bootstrap/include/std/base.h
+++ b/bootstrap/include/std/base.h
@@ -26,6 +26,7 @@ typedef uint16_t u16;
 typedef uint32_t u32;
 typedef uint64_t u64;
 typedef __uint128_t u128;
+typedef unsigned int uint;
 
 typedef int8_t  s8;
 typedef int16_t s16;
diff --git a/bootstrap/std/window.c b/bootstrap/std/window.c
index c289496..addb3e7 100644
--- a/bootstrap/std/window.c
+++ b/bootstrap/std/window.c
@@ -436,8 +436,9 @@ OSCursorPosition os_window_cursor_position_get(OSWindow window)
 
 int window_create_surface(void* instance, OSWindow window, const void* allocator, void** surface)
 {
-#define FORCE_XLIB_INITIALIZATION 1
     auto* surface_pointer = (VkSurfaceKHR*)surface;
+#ifdef __linux__
+#define FORCE_XLIB_INITIALIZATION 1
     if (use_x11 && FORCE_XLIB_INITIALIZATION)
     {
         auto* x11_display = glfwGetX11Display();
@@ -454,7 +455,10 @@ int window_create_surface(void* instance, OSWindow window, const void* allocator
     }
     else
     {
+#endif
         return glfwCreateWindowSurface(instance, window, allocator, surface_pointer);
+#ifdef __linux__
     }
+#endif
 }