From df6f2160560f0fa00f55a52bcced243e30fcf972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 28 Jun 2020 22:05:19 +0200 Subject: [PATCH] Disable the "Duplicate frames" feature if frameskip != 0. Works around / Fixes #13068 --- Core/HLE/sceDisplay.cpp | 7 +++++-- UI/GameSettingsScreen.cpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index f18a056be9c3..56fcf9bfc91d 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -754,12 +754,15 @@ void __DisplayFlip(int cyclesLate) { // Also let's always flip for animated shaders. const ShaderInfo *shaderInfo = g_Config.sPostShaderName == "Off" ? nullptr : GetPostShaderInfo(g_Config.sPostShaderName); bool postEffectRequiresFlip = false; + + bool duplicateFrames = g_Config.bRenderDuplicateFrames && g_Config.iFrameSkip == 0; + // postEffectRequiresFlip is not compatible with frameskip unthrottling, see #12325. if (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE && !(g_Config.bFrameSkipUnthrottle && !FrameTimingThrottled())) { if (shaderInfo) { - postEffectRequiresFlip = (shaderInfo->requires60fps || g_Config.bRenderDuplicateFrames); + postEffectRequiresFlip = (shaderInfo->requires60fps || duplicateFrames); } else { - postEffectRequiresFlip = g_Config.bRenderDuplicateFrames; + postEffectRequiresFlip = duplicateFrames; } } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 8202870c79ee..1a9ca4a977de 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -356,6 +356,9 @@ void GameSettingsScreen::CreateViews() { settingInfo_->Show(gr->T("RenderDuplicateFrames Tip", "Can make framerate smoother in games that run at lower framerates"), e.v); return UI::EVENT_CONTINUE; }); + frameDuplication->SetEnabledFunc([]() -> bool { + return g_Config.iFrameSkip == 0; + }); if (GetGPUBackend() == GPUBackend::VULKAN || GetGPUBackend() == GPUBackend::OPENGL) { static const char *bufferOptions[] = { "No buffer", "Up to 1", "Up to 2" };