Merge pull request #13072 from hrydgard/fix-duplicate-frames-freeze

Disable the "Duplicate frames" feature if frameskip != 0.
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2020-06-28 22:47:19 +02:00
commit 4569ca60f1
2 files changed
+8 -2

No files matched your search

+5 -2
View File
@@ -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;
}
}
+3
View File
@@ -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" };