Skip to content

Commit

Permalink
Merge pull request #13072 from hrydgard/fix-duplicate-frames-freeze
Browse files Browse the repository at this point in the history
Disable the "Duplicate frames" feature if frameskip != 0.
  • Loading branch information
hrydgard authored Jun 28, 2020
2 parents 63ead85 + df6f216 commit 4569ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Core/HLE/sceDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
3 changes: 3 additions & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
Expand Down

0 comments on commit 4569ca6

Please sign in to comment.