renderer_vulkan: Do not disable FIFO when Apple Low Power Mode is enabled, to prevent tearing

This commit is contained in:
RedBlackAka 2025-08-01 19:21:47 +02:00 committed by GitHub
parent efedbb16d0
commit bd0d0dedf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 15 deletions

View file

@ -5,6 +5,5 @@
namespace AppleUtils {
float GetRefreshRate();
int IsLowPowerModeEnabled();
} // namespace AppleUtils

View file

@ -25,8 +25,4 @@ float GetRefreshRate() { // TODO: How does this handle multi-monitor? -OS
return 60; // Something went wrong, so just return a generic value
}
int IsLowPowerModeEnabled() {
return (int)[NSProcessInfo processInfo].lowPowerModeEnabled;
}
} // namespace AppleUtils

View file

@ -86,16 +86,6 @@ static bool IsLowRefreshRate() {
}
#endif // defined(__APPLE__) || defined(ENABLE_SDL2)
#ifdef __APPLE__
// Apple's low power mode sometimes limits applications to 30fps without changing the refresh
// rate, meaning the above code doesn't catch it.
if (AppleUtils::IsLowPowerModeEnabled()) {
LOG_WARNING(Render_Vulkan, "Apple's low power mode is enabled, assuming low application "
"framerate. FIFO will be disabled");
return true;
}
#endif
return false;
}
} // Anonymous namespace