Re-enable sleep on display framerate setting to fix pacing issues on some multi monitor setups (#214)

This commit is contained in:
Wiseguy
2025-09-21 12:42:21 -04:00
committed by GitHub
parent facf03e250
commit ffb006f570

View File

@@ -388,10 +388,7 @@ namespace RT64 {
if (presentFrame && swapChainValid) {
// Wait until the approximate time the next present should be at the current intended rate.
if ((presentTimestamp != Timestamp()) && (targetRate > 0) && (targetRate > viOriginalRate)) {
// Don't sleep if the target framerate is equal or bigger than the refresh rate, as vsync will take care of it.
if (targetRate < ext.sharedResources->swapChainRate) {
Timer::preciseSleepUntil(presentTimestamp + std::chrono::nanoseconds(1'000'000'000 / targetRate));
}
Timer::preciseSleepUntil(presentTimestamp + std::chrono::nanoseconds(1'000'000'000 / targetRate));
}
if (presentWaitEnabled) {