Browse Source

macOS: fix crash on launch when opengl is used

Sasha Szpakowski 10 months ago
parent
commit
910af324dd
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/common/macos.mm

+ 3 - 1
src/common/macos.mm

@@ -26,8 +26,10 @@
 #import <Cocoa/Cocoa.h>
 #import <Cocoa/Cocoa.h>
 #import <QuartzCore/CAMetalLayer.h>
 #import <QuartzCore/CAMetalLayer.h>
 
 
+#if __has_include(<SDL3/SDL.h>)
+#include <SDL3/SDL.h>
+#else
 #include <SDL.h>
 #include <SDL.h>
-#if !SDL_VERSION_ATLEAST(3, 0, 0)
 #include <SDL_syswm.h>
 #include <SDL_syswm.h>
 #endif
 #endif