From 90c34699d628eaddb9ebd7d44fff59f650372fd9 Mon Sep 17 00:00:00 2001 From: Marius Seufzer Date: Fri, 23 Dec 2022 14:57:56 +0100 Subject: [PATCH] fix contentScaleFactor on iOS --- platform/ios/display_server_ios.mm | 2 +- platform/ios/godot_view.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm index 3f4a406116b..ce78b8d20f5 100644 --- a/platform/ios/display_server_ios.mm +++ b/platform/ios/display_server_ios.mm @@ -437,7 +437,7 @@ float DisplayServerIOS::screen_get_refresh_rate(int p_screen) const { } float DisplayServerIOS::screen_get_scale(int p_screen) const { - return [UIScreen mainScreen].nativeScale; + return [UIScreen mainScreen].scale; } Vector DisplayServerIOS::get_window_list() const { diff --git a/platform/ios/godot_view.mm b/platform/ios/godot_view.mm index 4537dc29852..19cb914521f 100644 --- a/platform/ios/godot_view.mm +++ b/platform/ios/godot_view.mm @@ -151,7 +151,7 @@ static const float earth_gravity = 9.80665; } - (void)godot_commonInit { - self.contentScaleFactor = [UIScreen mainScreen].nativeScale; + self.contentScaleFactor = [UIScreen mainScreen].scale; [self initTouches];