mirror of
https://github.com/id-Software/DOOM-iOS.git
synced 2025-05-30 00:31:15 +00:00
Set paused state when using the home button
This commit is contained in:
parent
62a6eb0af7
commit
d38f2c02f5
3 changed files with 5 additions and 0 deletions
|
@ -122,6 +122,7 @@ bool iphoneControllerIsAvailable() {
|
|||
}
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
setupPauseButtonHandler(controller);
|
||||
|
||||
// Register for controller connected/disconnected notifications
|
||||
|
@ -140,6 +141,7 @@ bool iphoneControllerIsAvailable() {
|
|||
[ns addObserverForName:GCControllerDidDisconnectNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
|
||||
controller = nil;
|
||||
}];
|
||||
#endif
|
||||
}
|
||||
initialized = true; // Only need to do this once
|
||||
}
|
||||
|
|
|
@ -234,6 +234,7 @@ BOOL settingsMenuSelected = NO;
|
|||
[ gAppDelegate ShowGLView ];
|
||||
|
||||
ResumeGame();
|
||||
paused = false;
|
||||
|
||||
Sound_StartLocalSound( "iphone/baborted_01.wav" );
|
||||
|
||||
|
@ -596,6 +597,7 @@ BOOL settingsMenuSelected = NO;
|
|||
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
|
||||
if (!context.previouslyFocusedView && [context.nextFocusedView isKindOfClass:[Banner_SubItem class]]) {
|
||||
[ gAppDelegate HideGLView ];
|
||||
paused = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -466,6 +466,7 @@ static const char * const MissionNames[TOTAL_EPISODES][9] = {
|
|||
|
||||
if (!context.previouslyFocusedView) {
|
||||
[ gAppDelegate HideGLView ];
|
||||
paused = true;
|
||||
}
|
||||
|
||||
[super didUpdateFocusInContext:context withAnimationCoordinator:coordinator];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue