• Sam Lantinga's avatar
    Allow overriding the app delegate on iOS · 5e1ffb1c
    Sam Lantinga authored
    Vittorio G.  to Eric, Sam
    
    Actually this is much simpler than i thought, I just had to specify a
    class method to get the delegate name and then the category can
    override that method!
    I've attached the patch that enables this features: in my code i could
    remove my custom main() and simply add
    
    @implementation SDLUIKitDelegate (customDelegate)
    +(NSString *)getAppDelegateClassName {
       return @"HedgewarsAppDelegate";
    }
    @end
    
    I tested it and with the sdl demos it loads the normal
    SDLUIKitDelegate, while in my code it loads my HedgewarsAppDelegate!
    5e1ffb1c
Name
Last commit
Last update
..
atomic Loading commit data...
audio Loading commit data...
core Loading commit data...
cpuinfo Loading commit data...
events Loading commit data...
file Loading commit data...
haptic Loading commit data...
joystick Loading commit data...
libm Loading commit data...
loadso Loading commit data...
main Loading commit data...
power Loading commit data...
render Loading commit data...
stdlib Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
SDL.c Loading commit data...
SDL_assert.c Loading commit data...
SDL_assert_c.h Loading commit data...
SDL_compat.c Loading commit data...
SDL_error.c Loading commit data...
SDL_error_c.h Loading commit data...
SDL_fatal.c Loading commit data...
SDL_fatal.h Loading commit data...
SDL_hints.c Loading commit data...
SDL_log.c Loading commit data...