mirror of https://github.com/encounter/SDL.git
Fixed the status bar visibility in iOS 7
This commit is contained in:
parent
85c2e2367c
commit
f8c11bb955
|
@ -35,5 +35,6 @@
|
||||||
- (void)viewDidLayoutSubviews;
|
- (void)viewDidLayoutSubviews;
|
||||||
- (NSUInteger)supportedInterfaceOrientations;
|
- (NSUInteger)supportedInterfaceOrientations;
|
||||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient;
|
||||||
|
- (BOOL)prefersStatusBarHidden;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -119,6 +119,15 @@
|
||||||
return (orientationMask & (1 << orient));
|
return (orientationMask & (1 << orient));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)prefersStatusBarHidden
|
||||||
|
{
|
||||||
|
if (self->window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) {
|
||||||
|
return YES;
|
||||||
|
} else {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* SDL_VIDEO_DRIVER_UIKIT */
|
#endif /* SDL_VIDEO_DRIVER_UIKIT */
|
||||||
|
|
|
@ -99,11 +99,13 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo
|
||||||
if (displaydata->uiscreen == [UIScreen mainScreen]) {
|
if (displaydata->uiscreen == [UIScreen mainScreen]) {
|
||||||
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
|
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
|
||||||
|
|
||||||
|
/* This was setup earlier for our window, and in iOS 7 is controlled by the view, not the application
|
||||||
if ([UIApplication sharedApplication].statusBarHidden) {
|
if ([UIApplication sharedApplication].statusBarHidden) {
|
||||||
window->flags |= SDL_WINDOW_BORDERLESS;
|
window->flags |= SDL_WINDOW_BORDERLESS;
|
||||||
} else {
|
} else {
|
||||||
window->flags &= ~SDL_WINDOW_BORDERLESS;
|
window->flags &= ~SDL_WINDOW_BORDERLESS;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
|
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizeable */
|
||||||
window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */
|
window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */
|
||||||
|
|
Loading…
Reference in New Issue