mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 13:25:28 +00:00
(Apple - No Thread) Fix crash when backgrounding the app.
This commit is contained in:
parent
f3d5a44e76
commit
2f3a79c0af
@ -34,7 +34,7 @@ static CFRunLoopObserverRef iterate_observer;
|
||||
|
||||
static void do_iteration()
|
||||
{
|
||||
if (iterate_observer)
|
||||
if (iterate_observer && apple_is_running && !g_extern.is_paused)
|
||||
{
|
||||
if (apple_rarch_iterate_once())
|
||||
{
|
||||
|
@ -231,10 +231,12 @@ static void handle_touch_event(NSArray* touches)
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
apple_start_iteration();
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
apple_stop_iteration();
|
||||
}
|
||||
|
||||
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||
@ -268,12 +270,10 @@ static void handle_touch_event(NSArray* touches)
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
|
||||
[_window setRootViewController:[RAGameView get]];
|
||||
g_extern.is_paused = false;
|
||||
apple_start_iteration();
|
||||
}
|
||||
|
||||
- (IBAction)showPauseMenu:(id)sender
|
||||
{
|
||||
apple_stop_iteration();
|
||||
g_extern.is_paused = true;
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:false withAnimation:UIStatusBarAnimationNone];
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:false];
|
||||
|
Loading…
x
Reference in New Issue
Block a user