瀏覽代碼

Automatically detect SDL_main_private.h

Caleb Cornett 6 月之前
父節點
當前提交
abe6d9db97
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      include/SDL3/SDL_main.h

+ 6 - 0
include/SDL3/SDL_main.h

@@ -133,6 +133,12 @@
 
 #endif
 
+#if defined(__has_include)
+    #if __has_include("SDL_main_private.h") && __has_include("SDL_main_impl_private.h")
+        #define SDL_PLATFORM_PRIVATE_MAIN
+    #endif
+#endif
+
 #ifndef SDL_MAIN_HANDLED
     #if defined(SDL_PLATFORM_PRIVATE_MAIN)
         /* Private platforms may have their own ideas about entry points. */