Merge pull request #12659 from unknownbrackets/vsync

Support vsync in all hardware backends, support runtime update
This commit is contained in:
Henrik Rydgård 2020-03-01 09:52:14 +01:00 committed by GitHub
commit 2ec82951a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 87 additions and 91 deletions

View file

@ -556,7 +556,12 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) {
// we have nothing to do here.
bool doFrameSkip = g_Config.iFrameSkip != 0;
if (!throttle && g_Config.bFrameSkipUnthrottle) {
bool unthrottleNeedsSkip = g_Config.bFrameSkipUnthrottle;
if (g_Config.bVSync && GetGPUBackend() == GPUBackend::VULKAN) {
// Vulkan doesn't support the interval setting, so we force frameskip.
unthrottleNeedsSkip = true;
}
if (!throttle && unthrottleNeedsSkip) {
doFrameSkip = true;
skipFrame = true;
if (numSkippedFrames >= 7) {