Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
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

File 1 of 1 in 26e8d76

@@ -186,8 +186,6 @@ - (id)init

- (void)postFinishLaunch
{
SDL_SetMainReady();

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

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

return YES;

0 comments on commit 26e8d76

Please sign in to comment.