summaryrefslogtreecommitdiff
path: root/src/video/uikit/SDL_uikitvideo.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/uikit/SDL_uikitvideo.m')
-rw-r--r--src/video/uikit/SDL_uikitvideo.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m
index 932379c6..658aa3dc 100644
--- a/src/video/uikit/SDL_uikitvideo.m
+++ b/src/video/uikit/SDL_uikitvideo.m
@@ -238,6 +238,13 @@ UIKit_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
} else {
UIScreenMode *uimode = (UIScreenMode *) mode->driverdata;
[uiscreen setCurrentMode:uimode];
+
+ CGSize size = [uimode size];
+ if (size.width >= size.height) {
+ [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
+ } else {
+ [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];
+ }
}
return 0;