mirror of
https://github.com/izzy2lost/xenia-edge.git
synced 2026-07-06 00:20:26 -07:00
[GPU] Remove 2.5x vblank limit when framerate_limit is applied
Better frame pacing when these are totally decoupled
This commit is contained in:
@@ -201,17 +201,11 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor,
|
||||
threading::NanoSleep(sleep_ns);
|
||||
#endif
|
||||
} else {
|
||||
// Unlimited mode (vsync=false)
|
||||
// Unlimited mode (vsync=false) - fire vblanks as fast as
|
||||
// possible Host presentation is separately throttled by
|
||||
// framerate_limit
|
||||
MarkVblank();
|
||||
if (cvars::framerate_limit > 0) {
|
||||
// Cap vblanks at 2.5x framerate_limit to avoid flooding guest
|
||||
const uint64_t max_vblank_hz = cvars::framerate_limit * 5 / 2;
|
||||
const uint64_t sleep_ns = 1000000000 / max_vblank_hz;
|
||||
threading::NanoSleep(sleep_ns);
|
||||
} else {
|
||||
// Truly unlimited - fire as fast as possible
|
||||
threading::Sleep(std::chrono::milliseconds(1));
|
||||
}
|
||||
threading::Sleep(std::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user