Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Fixed potential problem with postFinishLaunch being overridden by the…

… application.

Vittorio Giovara

I find that the calling point in SDL_uikitappdelegate.m is dangerous as the -(void) postFinishLaunch method can be overridden when subclassing.
Could this be moved in inside the init or in the didFinishLaunchingWithOptions method which are always called even when subclassed?
  • Loading branch information
slouken committed Jul 6, 2013
1 parent fa2d022 commit 26e8d7648cefe295fba54364c1daf3565773b97b
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/video/uikit/SDL_uikitappdelegate.m
@@ -186,8 +186,6 @@ - (id)init

- (void)postFinishLaunch

/* run the user's application, passing argc and argv */
exit_status = SDL_main(forward_argc, forward_argv);
@@ -223,6 +221,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
SDL_RegisterHintChangedCb(SDL_HINT_IDLE_TIMER_DISABLED, &SDL_IdleTimerDisabledChanged);

[self performSelector:@selector(postFinishLaunch) withObject:nil afterDelay:0.0];

return YES;

0 comments on commit 26e8d76

Please sign in to comment.