Merge pull request #12660 from unknownbrackets/frame-latency

GPU: Add setting to control inflight frame usage
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2020-03-02 00:16:48 +01:00
commit fa8968f5c6
12 files changed
+56 -4

No files matched your search

+9
View File
@@ -349,6 +349,15 @@ void GameSettingsScreen::CreateViews() {
});
#endif
if (GetGPUBackend() == GPUBackend::VULKAN || GetGPUBackend() == GPUBackend::OPENGL) {
static const char *bufferOptions[] = { "No buffer", "Up to 1", "Up to 2" };
PopupMultiChoice *inflightChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInflightFrames, gr->T("Buffer graphics commands (faster, input lag)"), bufferOptions, 0, ARRAY_SIZE(bufferOptions), gr->GetName(), screenManager()));
inflightChoice->OnChoice.Add([=](EventParams &e) {
NativeMessageReceived("gpu_resized", "");
return UI::EVENT_CONTINUE;
});
}
CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform")));
hwTransform->OnClick.Handle(this, &GameSettingsScreen::OnHardwareTransform);
hwTransform->SetDisabledPtr(&g_Config.bSoftwareRendering);