Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c
source/src/video/uikit/SDL_uikitappdelegate.m
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -38,15 +38,25 @@
#undef main
#endif
static SDL_main_func forward_main;
static int forward_argc;
static char **forward_argv;
static int exit_status;
int main(int argc, char **argv)
#if defined(SDL_MAIN_NEEDED) && !defined(IOS_DYLIB)
/* SDL is being built as a static library, include main() */
int main(int argc, char *argv[])
{
   return SDL_UIKitRunApp(argc, argv, SDL_main);
}
#endif /* SDL_MAIN_NEEDED && !IOS_DYLIB */
int SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction)
{
    int i;
    /* store arguments */
   forward_main = mainFunction;
    forward_argc = argc;
    forward_argv = (char **)malloc((argc+1) * sizeof(char *));
    for (i = 0; i < argc; i++) {
@@ -333,6 +343,7 @@
        window.alpha = 0.0;
    } completion:^(BOOL finished) {
        window.hidden = YES;
        UIKit_ForceUpdateHomeIndicator(); /* Wait for launch screen to hide so settings are applied to the actual view controller. */
    }];
}
@@ -344,7 +355,7 @@
    /* run the user's application, passing argc and argv */
    SDL_iPhoneSetEventPump(SDL_TRUE);
    exit_status = SDL_main(forward_argc, forward_argv);
    exit_status = forward_main(forward_argc, forward_argv);
    SDL_iPhoneSetEventPump(SDL_FALSE);
    if (launchWindow) {