From e7611e5eabccbf71a0dd9eba74e15a1caad77895 Mon Sep 17 00:00:00 2001 From: Zach Coleman Date: Wed, 22 Nov 2023 11:56:12 -0500 Subject: [PATCH] Make OSIPhone::get_screen_refresh_rate respect iOS Low Power Mode --- platform/iphone/os_iphone.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/iphone/os_iphone.mm b/platform/iphone/os_iphone.mm index 59252ae68..6a78e9518 100644 --- a/platform/iphone/os_iphone.mm +++ b/platform/iphone/os_iphone.mm @@ -590,7 +590,11 @@ int OSIPhone::get_screen_dpi(int p_screen) const { } float OSIPhone::get_screen_refresh_rate(int p_screen) const { - return [UIScreen mainScreen].maximumFramesPerSecond; + float fps = [UIScreen mainScreen].maximumFramesPerSecond; + if ([NSProcessInfo processInfo].lowPowerModeEnabled) { + fps = 60; + } + return fps; } Rect2 OSIPhone::get_window_safe_area() const {