Fix post processing menu in the fullscreen UI (#3187)

This commit is contained in:
RSDuck 2024-04-23 08:26:46 +02:00 committed by GitHub
parent 52bdbf35db
commit 89c0d4900b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4424,6 +4424,7 @@ void FullscreenUI::DrawDisplaySettingsPage()
void FullscreenUI::PopulatePostProcessingChain(SettingsInterface* si) void FullscreenUI::PopulatePostProcessingChain(SettingsInterface* si)
{ {
const u32 stages = PostProcessing::Config::GetStageCount(*si); const u32 stages = PostProcessing::Config::GetStageCount(*si);
s_postprocessing_stages.clear();
s_postprocessing_stages.reserve(stages); s_postprocessing_stages.reserve(stages);
for (u32 i = 0; i < stages; i++) for (u32 i = 0; i < stages; i++)
{ {
@ -4451,12 +4452,12 @@ void FullscreenUI::DrawPostProcessingSettingsPage()
MenuHeading(FSUI_CSTR("Controls")); MenuHeading(FSUI_CSTR("Controls"));
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Enable Post Processing"), DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Enable Post Processing"),
FSUI_CSTR("If not enabled, the current post processing chain will be ignored."), "Display", FSUI_CSTR("If not enabled, the current post processing chain will be ignored."), "PostProcessing",
"PostProcessing", false); "Enabled", false);
if (MenuButton(FSUI_ICONSTR(ICON_FA_SEARCH, "Reload Shaders"), if (MenuButton(FSUI_ICONSTR(ICON_FA_SEARCH, "Reload Shaders"),
FSUI_CSTR("Reloads the shaders from disk, applying any changes."), FSUI_CSTR("Reloads the shaders from disk, applying any changes."),
bsi->GetBoolValue("Display", "PostProcessing", false))) bsi->GetBoolValue("PostProcessing", "Enabled", false)))
{ {
if (System::IsValid() && PostProcessing::ReloadShaders()) if (System::IsValid() && PostProcessing::ReloadShaders())
ShowToast(std::string(), FSUI_STR("Post-processing shaders reloaded.")); ShowToast(std::string(), FSUI_STR("Post-processing shaders reloaded."));