Fixed SDL_SetWindowFullscreen not properly updating the status bar visibility in iOS 7+
parent
c81ce5a0a8
commit
b4d15ece6d
|
@ -241,7 +241,9 @@ void
|
||||||
UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
|
UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
|
||||||
{
|
{
|
||||||
SDL_DisplayData *displaydata = (SDL_DisplayData *) display->driverdata;
|
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) {
|
if (fullscreen) {
|
||||||
[UIApplication sharedApplication].statusBarHidden = YES;
|
[UIApplication sharedApplication].statusBarHidden = YES;
|
||||||
|
@ -249,6 +251,12 @@ UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
|
||||||
[UIApplication sharedApplication].statusBarHidden = NO;
|
[UIApplication sharedApplication].statusBarHidden = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __IPHONE_7_0
|
||||||
|
if ([viewcontroller respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
|
||||||
|
[viewcontroller setNeedsStatusBarAppearanceUpdate];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CGRect bounds;
|
CGRect bounds;
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
bounds = [displaydata->uiscreen bounds];
|
bounds = [displaydata->uiscreen bounds];
|
||||||
|
|
Loading…
Reference in New Issue