diff --git a/src/video/uikit/SDL_uikitvideo.m b/src/video/uikit/SDL_uikitvideo.m index 4377b9073..f12df8bde 100644 --- a/src/video/uikit/SDL_uikitvideo.m +++ b/src/video/uikit/SDL_uikitvideo.m @@ -204,7 +204,8 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen) * https://bugzilla.libsdl.org/show_bug.cgi?id=3465 * https://forums.developer.apple.com/thread/65337 */ UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation; - BOOL landscape = UIInterfaceOrientationIsLandscape(orient); + BOOL landscape = UIInterfaceOrientationIsLandscape(orient) || + !(UIKit_GetSupportedOrientations(window) & (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown)); BOOL fullscreen = CGRectEqualToRect(screen.bounds, frame); /* The orientation flip doesn't make sense when the window is smaller