summaryrefslogtreecommitdiffstats
path: root/platform/ios/view_controller.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/view_controller.mm')
-rw-r--r--platform/ios/view_controller.mm12
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/ios/view_controller.mm b/platform/ios/view_controller.mm
index 6f6c04c2c8..787e767109 100644
--- a/platform/ios/view_controller.mm
+++ b/platform/ios/view_controller.mm
@@ -258,7 +258,11 @@
case DisplayServer::SCREEN_PORTRAIT:
return UIInterfaceOrientationMaskPortrait;
case DisplayServer::SCREEN_REVERSE_LANDSCAPE:
- return UIInterfaceOrientationMaskLandscapeRight;
+ if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
+ return UIInterfaceOrientationMaskLandscapeLeft;
+ } else {
+ return UIInterfaceOrientationMaskLandscapeRight;
+ }
case DisplayServer::SCREEN_REVERSE_PORTRAIT:
return UIInterfaceOrientationMaskPortraitUpsideDown;
case DisplayServer::SCREEN_SENSOR_LANDSCAPE:
@@ -268,7 +272,11 @@
case DisplayServer::SCREEN_SENSOR:
return UIInterfaceOrientationMaskAll;
case DisplayServer::SCREEN_LANDSCAPE:
- return UIInterfaceOrientationMaskLandscapeLeft;
+ if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) {
+ return UIInterfaceOrientationMaskLandscapeRight;
+ } else {
+ return UIInterfaceOrientationMaskLandscapeLeft;
+ }
}
}