浏览代码

Allow defining SDL_MAIN_HANDLED on iOS if you're using another runtime that provides an application delegate

Sam Lantinga 4 年之前
父节点
当前提交
3a4b217d6c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/main/uikit/SDL_uikit_main.c

+ 2 - 0
src/main/uikit/SDL_uikit_main.c

@@ -6,6 +6,7 @@
 /* Include the SDL main definition header */
 #include "SDL_main.h"
 
+#ifndef SDL_MAIN_HANDLED
 #ifdef main
 #undef main
 #endif
@@ -15,5 +16,6 @@ main(int argc, char *argv[])
 {
     return SDL_UIKitRunApp(argc, argv, SDL_main);
 }
+#endif /* !SDL_MAIN_HANDLED */
 
 /* vi: set ts=4 sw=4 expandtab: */