Merge pull request #13258 from iota97/duplicate-frame-cleanup

Remove double disable function on frame duplication
This commit is contained in:
Henrik Rydgård 2020-08-07 11:32:30 +02:00 committed by GitHub
commit 583b92f364
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -381,15 +381,12 @@ void GameSettingsScreen::CreateViews() {
#endif
CheckBox *frameDuplication = graphicsSettings->Add(new CheckBox(&g_Config.bRenderDuplicateFrames, gr->T("Render duplicate frames to 60hz")));
frameDuplication->SetEnabledFunc([] {
return g_Config.iRenderingMode != FB_NON_BUFFERED_MODE || (g_Config.bSoftwareRendering && g_Config.iFrameSkip != 0);
});
frameDuplication->OnClick.Add([=](EventParams &e) {
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;
frameDuplication->SetEnabledFunc([] {
return g_Config.iRenderingMode != FB_NON_BUFFERED_MODE && g_Config.iFrameSkip == 0;
});
if (GetGPUBackend() == GPUBackend::VULKAN || GetGPUBackend() == GPUBackend::OPENGL) {