Make screen_get_refresh_rate() respect iOS Low Power Mode
(cherry picked from commit 6a8f6bae4c
)
This commit is contained in:
parent
93fd5da49c
commit
9609df181d
|
@ -443,7 +443,11 @@ int DisplayServerIOS::screen_get_dpi(int p_screen) const {
|
|||
}
|
||||
|
||||
float DisplayServerIOS::screen_get_refresh_rate(int p_screen) const {
|
||||
return [UIScreen mainScreen].maximumFramesPerSecond;
|
||||
float fps = [UIScreen mainScreen].maximumFramesPerSecond;
|
||||
if ([NSProcessInfo processInfo].lowPowerModeEnabled) {
|
||||
fps = 60;
|
||||
}
|
||||
return fps;
|
||||
}
|
||||
|
||||
float DisplayServerIOS::screen_get_scale(int p_screen) const {
|
||||
|
|
Loading…
Reference in New Issue