mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-23 01:27:17 +01:00
Make OSIPhone::get_screen_refresh_rate respect iOS Low Power Mode
This commit is contained in:
parent
838b46ac1a
commit
e7611e5eab
@ -590,7 +590,11 @@ int OSIPhone::get_screen_dpi(int p_screen) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float OSIPhone::get_screen_refresh_rate(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 {
|
Rect2 OSIPhone::get_window_safe_area() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user