mirror of https://github.com/encounter/SDL.git
Fixed SDL_SetWindowFullscreen not properly updating the status bar visibility in iOS 7+
This commit is contained in:
parent
c81ce5a0a8
commit
b4d15ece6d
|
@ -241,7 +241,9 @@ void
|
|||
UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
|
||||
{
|
||||
SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
|
||||
UIWindow *uiwindow = ((SDL_WindowData *) window->driverdata)->uiwindow;
|
||||
SDL_WindowData *windowdata = (SDL_WindowData *) window->driverdata;
|
||||
SDL_uikitviewcontroller *viewcontroller = windowdata->viewcontroller;
|
||||
UIWindow *uiwindow = windowdata->uiwindow;
|
||||
|
||||
if (fullscreen) {
|
||||
[UIApplication sharedApplication].statusBarHidden = YES;
|
||||
|
@ -249,6 +251,12 @@ UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
|
|||
[UIApplication sharedApplication].statusBarHidden = NO;
|
||||
}
|
||||
|
||||
#ifdef __IPHONE_7_0
|
||||
if ([viewcontroller respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
|
||||
[viewcontroller setNeedsStatusBarAppearanceUpdate];
|
||||
}
|
||||
#endif
|
||||
|
||||
CGRect bounds;
|
||||
if (fullscreen) {
|
||||
bounds = [displaydata->uiscreen bounds];
|
||||
|
|
Loading…
Reference in New Issue