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?
This commit is contained in:
parent
cbc0db6e72
commit
2015d5faa6
1 changed files with 1 additions and 2 deletions
|
@ -186,8 +186,6 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
|
|||
|
||||
- (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 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue