diff --git a/Common/UI/PopupScreens.cpp b/Common/UI/PopupScreens.cpp index 02c2fd1856..6a1b0e942b 100644 --- a/Common/UI/PopupScreens.cpp +++ b/Common/UI/PopupScreens.cpp @@ -141,12 +141,12 @@ void PopupMultiChoice::ChoiceCallback(int num) { UI::EventParams e{}; e.v = this; e.a = num; + e.b = PostChoiceCallback(num); OnChoice.Trigger(e); if (restoreFocus_) { SetFocusedView(this); } - PostChoiceCallback(num); } } diff --git a/Common/UI/PopupScreens.h b/Common/UI/PopupScreens.h index f7f781b531..422be1efa5 100644 --- a/Common/UI/PopupScreens.h +++ b/Common/UI/PopupScreens.h @@ -238,7 +238,7 @@ private: UI::EventReturn HandleClick(UI::EventParams &e); void ChoiceCallback(int num); - virtual void PostChoiceCallback(int num) {} + virtual bool PostChoiceCallback(int num) { return true; } I18NCat category_; ScreenManager *screenManager_; @@ -274,9 +274,15 @@ public: } protected: - void PostChoiceCallback(int num) override { - if (valueStr_) { + bool PostChoiceCallback(int num) override { + if (!valueStr_) { + return true; + } + if (*valueStr_ != choices_[num]) { *valueStr_ = choices_[num]; + return true; + } else { + return false; } } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 9b6e22b844..35213f4986 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1098,6 +1098,11 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) { PopupMultiChoiceDynamic *theme = systemSettings->Add(new PopupMultiChoiceDynamic(&g_Config.sThemeName, sy->T("Theme"), GetThemeInfoNames(), I18NCat::THEMES, screenManager())); theme->OnChoice.Add([=](EventParams &e) { UpdateTheme(screenManager()->getUIContext()); + // Reset the tint/saturation if the theme changed. + if (e.b) { + g_Config.fUITint = 0.0f; + g_Config.fUISaturation = 1.0f; + } return UI::EVENT_CONTINUE; });