mirror of
https://github.com/id-Software/DOOM-iOS.git
synced 2025-05-31 09:11:28 +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);
|
setupPauseButtonHandler(controller);
|
||||||
|
|
||||||
// Register for controller connected/disconnected notifications
|
// Register for controller connected/disconnected notifications
|
||||||
|
@ -140,6 +141,7 @@ bool iphoneControllerIsAvailable() {
|
||||||
[ns addObserverForName:GCControllerDidDisconnectNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
|
[ns addObserverForName:GCControllerDidDisconnectNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
|
||||||
controller = nil;
|
controller = nil;
|
||||||
}];
|
}];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
initialized = true; // Only need to do this once
|
initialized = true; // Only need to do this once
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,6 +234,7 @@ BOOL settingsMenuSelected = NO;
|
||||||
[ gAppDelegate ShowGLView ];
|
[ gAppDelegate ShowGLView ];
|
||||||
|
|
||||||
ResumeGame();
|
ResumeGame();
|
||||||
|
paused = false;
|
||||||
|
|
||||||
Sound_StartLocalSound( "iphone/baborted_01.wav" );
|
Sound_StartLocalSound( "iphone/baborted_01.wav" );
|
||||||
|
|
||||||
|
@ -596,6 +597,7 @@ BOOL settingsMenuSelected = NO;
|
||||||
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
|
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator {
|
||||||
if (!context.previouslyFocusedView && [context.nextFocusedView isKindOfClass:[Banner_SubItem class]]) {
|
if (!context.previouslyFocusedView && [context.nextFocusedView isKindOfClass:[Banner_SubItem class]]) {
|
||||||
[ gAppDelegate HideGLView ];
|
[ gAppDelegate HideGLView ];
|
||||||
|
paused = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -466,6 +466,7 @@ static const char * const MissionNames[TOTAL_EPISODES][9] = {
|
||||||
|
|
||||||
if (!context.previouslyFocusedView) {
|
if (!context.previouslyFocusedView) {
|
||||||
[ gAppDelegate HideGLView ];
|
[ gAppDelegate HideGLView ];
|
||||||
|
paused = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[super didUpdateFocusInContext:context withAnimationCoordinator:coordinator];
|
[super didUpdateFocusInContext:context withAnimationCoordinator:coordinator];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue