diff options
Diffstat (limited to 'platform/ios/display_server_ios.mm')
-rw-r--r-- | platform/ios/display_server_ios.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm index 5637931e73..bfb09b6861 100644 --- a/platform/ios/display_server_ios.mm +++ b/platform/ios/display_server_ios.mm @@ -568,6 +568,11 @@ float DisplayServerIOS::screen_get_max_scale() const { void DisplayServerIOS::screen_set_orientation(DisplayServer::ScreenOrientation p_orientation, int p_screen) { screen_orientation = p_orientation; + if (@available(iOS 16.0, *)) { + [AppDelegate.viewController setNeedsUpdateOfSupportedInterfaceOrientations]; + } else { + [UIViewController attemptRotationToDeviceOrientation]; + } } DisplayServer::ScreenOrientation DisplayServerIOS::screen_get_orientation(int p_screen) const { |