From 3a4b217d6c26df04f4afe05d5f0eec5edd14afef Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 31 Jul 2021 12:44:29 -0700 Subject: [PATCH] Allow defining SDL_MAIN_HANDLED on iOS if you're using another runtime that provides an application delegate --- src/main/uikit/SDL_uikit_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/uikit/SDL_uikit_main.c b/src/main/uikit/SDL_uikit_main.c index 5717d0e80..702f67391 100644 --- a/src/main/uikit/SDL_uikit_main.c +++ b/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: */