Fixed SDL_SetWindowFullscreen not properly updating the status bar visibility in iOS 7+

This commit is contained in:
Alex Szpakowski 2014-07-16 16:12:20 -03:00
parent c81ce5a0a8
commit b4d15ece6d
1 changed files with 9 additions and 1 deletions

View File

@ -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];