mirror of
https://github.com/rt64/rt64.git
synced 2025-12-05 01:00:13 +00:00
Re-enable sleep on display framerate setting to fix pacing issues on some multi monitor setups (#214)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user