FSUI: Automatically hide advanced graphics settings

depending on global advanced settings visibility
This commit is contained in:
KamFretoZ 2024-05-13 21:45:56 +07:00 committed by Connor McLaughlin
parent aeff832ffc
commit b9f4a01138
1 changed files with 26 additions and 24 deletions

View File

@ -3912,6 +3912,10 @@ void FullscreenUI::DrawGraphicsSettingsPage()
static constexpr const char* s_gsdump_compression[] = {FSUI_NSTR("Uncompressed"), FSUI_NSTR("LZMA (xz)"), FSUI_NSTR("Zstandard (zst)")};
const bool show_advanced_settings = ShouldShowAdvancedSettings(bsi);
if (show_advanced_settings)
{
MenuHeading(FSUI_CSTR("Advanced"));
DrawToggleSetting(bsi, FSUI_CSTR("Skip Presenting Duplicate Frames"),
FSUI_CSTR("Skips displaying frames that don't change in 25/30fps games. Can improve speed, but increase input lag/make frame pacing "
@ -3920,12 +3924,9 @@ void FullscreenUI::DrawGraphicsSettingsPage()
DrawToggleSetting(bsi, FSUI_CSTR("Disable Threaded Presentation"),
FSUI_CSTR("Presents frames on the main GS thread instead of a worker thread. Used for debugging frametime issues."),
"EmuCore/GS", "DisableThreadedPresentation", false);
if (hw_fixes_visible)
{
DrawIntListSetting(bsi, FSUI_CSTR("Hardware Download Mode"), FSUI_CSTR("Changes synchronization behavior for GS downloads."),
"EmuCore/GS", "HWDownloadMode", static_cast<int>(GSHardwareDownloadMode::Enabled), s_hw_download, std::size(s_hw_download),
true);
}
DrawIntListSetting(bsi, FSUI_CSTR("Allow Exclusive Fullscreen"),
FSUI_CSTR("Overrides the driver's heuristics for enabling exclusive fullscreen, or direct flip/scanout."), "EmuCore/GS",
"ExclusiveFullscreenControl", -1, s_generic_options, std::size(s_generic_options), true, -1,
@ -3941,6 +3942,7 @@ void FullscreenUI::DrawGraphicsSettingsPage()
"EmuCore/GS", "DisableShaderCache", false);
DrawToggleSetting(bsi, FSUI_CSTR("Disable Vertex Shader Expand"), FSUI_CSTR("Falls back to the CPU for expanding sprites/lines."),
"EmuCore/GS", "DisableVertexShaderExpand", false);
}
EndMenuButtons();
}