summaryrefslogtreecommitdiffstats
path: root/platform/ios/godot_view.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/godot_view.mm')
-rw-r--r--platform/ios/godot_view.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/ios/godot_view.mm b/platform/ios/godot_view.mm
index 1dddc9306e..552c4c262c 100644
--- a/platform/ios/godot_view.mm
+++ b/platform/ios/godot_view.mm
@@ -71,7 +71,7 @@ static const float earth_gravity = 9.80665;
CALayer<DisplayLayer> *layer;
- if ([driverName isEqualToString:@"vulkan"]) {
+ if ([driverName isEqualToString:@"vulkan"] || [driverName isEqualToString:@"metal"]) {
#if defined(TARGET_OS_SIMULATOR) && TARGET_OS_SIMULATOR
if (@available(iOS 13, *)) {
layer = [GodotMetalLayer layer];
@@ -441,6 +441,9 @@ static const float earth_gravity = 9.80665;
UIInterfaceOrientation interfaceOrientation = UIInterfaceOrientationUnknown;
+#if __IPHONE_OS_VERSION_MAX_ALLOWED < 140000
+ interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];
+#else
if (@available(iOS 13, *)) {
interfaceOrientation = [UIApplication sharedApplication].delegate.window.windowScene.interfaceOrientation;
#if !defined(TARGET_OS_SIMULATOR) || !TARGET_OS_SIMULATOR
@@ -448,6 +451,7 @@ static const float earth_gravity = 9.80665;
interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];
#endif
}
+#endif
switch (interfaceOrientation) {
case UIInterfaceOrientationLandscapeLeft: {