Skip to content

Commit

Permalink
Remove double disable function on frame duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
iota97 committed Aug 7, 2020
1 parent ad0ef74 commit d2a9bc6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d2a9bc6

Please sign in to comment.