fixing windows build

This commit is contained in:
2024-09-14 13:14:36 +02:00
parent 429bd9eabd
commit 976afdac3d
4 changed files with 16 additions and 8 deletions

View File

@@ -153,8 +153,6 @@ namespace mlx
{ {
double s, c; double s, c;
::sincos(x, &s, &c); ::sincos(x, &s, &c);
*sin = static_cast<T>(s); *sin = static_cast<T>(s);
*cos = static_cast<T>(c); *cos = static_cast<T>(c);
} }

View File

@@ -3,8 +3,6 @@
#define VK_NO_PROTOTYPES #define VK_NO_PROTOTYPES
#define Window X11Window // f*ck X11
#include <mlx_profile.h> #include <mlx_profile.h>
#include <mlx.h> #include <mlx.h>
#include <cstdio> #include <cstdio>
@@ -14,9 +12,6 @@
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <SDL2/SDL_vulkan.h> #include <SDL2/SDL_vulkan.h>
#include <Renderer/Vulkan/VulkanPrototypes.h>
#include <kvf.h>
#include <functional> #include <functional>
#include <memory> #include <memory>
#include <list> #include <list>
@@ -47,6 +42,7 @@
#include <iterator> #include <iterator>
#include <stb_truetype.h> #include <stb_truetype.h>
#include <variant> #include <variant>
#if defined(MLX_PLAT_LINUX) #if defined(MLX_PLAT_LINUX)
#include <math.h> // sincos #include <math.h> // sincos
#endif #endif
@@ -69,7 +65,11 @@
#include <vma.h> #include <vma.h>
#endif #endif
#undef Window #include <Utils/AntiX11.h>
#include <Utils/AntiWindows.h>
#include <Renderer/Vulkan/VulkanPrototypes.h>
#include <kvf.h>
#include <Core/Logs.h> #include <Core/Logs.h>
#include <Core/EventBus.h> #include <Core/EventBus.h>

5
runtime/Includes/Utils/AntiWindows.h git.filemode.normal_file
View File

@@ -0,0 +1,5 @@
#undef CreateWindow
#undef GetEnvironmentVariable
#undef GetSystemDirectory
#undef MemoryBarrier
#undef RemoveDirectory

5
runtime/Includes/Utils/AntiX11.h git.filemode.normal_file
View File

@@ -0,0 +1,5 @@
#undef Always
#undef Bool
#undef False
#undef None
#undef True