diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 07af31d7d..7361d4aab 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -685,6 +685,21 @@ void GuiMenu::openUIOptions() screensaverRow.makeAcceptInputHandler(std::bind(&GuiMenu::openScreensaverOptions, this)); s->addRow(screensaverRow); + // Enable theme variant triggers. + auto themeVariantTriggers = std::make_shared(); + themeVariantTriggers->setState(Settings::getInstance()->getBool("ThemeVariantTriggers")); + s->addWithLabel("ENABLE THEME VARIANT TRIGGERS", themeVariantTriggers); + s->addSaveFunc([themeVariantTriggers, s] { + if (themeVariantTriggers->getState() != + Settings::getInstance()->getBool("ThemeVariantTriggers")) { + Settings::getInstance()->setBool("ThemeVariantTriggers", + themeVariantTriggers->getState()); + s->setNeedsSaving(); + s->setNeedsReloading(); + s->setInvalidateCachedBackground(); + } + }); + // Blur background when the menu is open. auto menuBlurBackground = std::make_shared(); menuBlurBackground->setState(Settings::getInstance()->getBool("MenuBlurBackground")); diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 203a77650..879e1f02e 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -827,8 +827,7 @@ std::shared_ptr ViewController::getGamelistView(SystemData* system } } } - else { - // Variant triggers. + else if (Settings::getInstance()->getBool("ThemeVariantTriggers")) { const auto overrides = system->getTheme()->getCurrentThemeSetSelectedVariantOverrides(); if (!overrides.empty()) { diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 57fa80b3c..c384d05e3 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -203,6 +203,7 @@ void Settings::setDefaults() #endif mBoolMap["ScreensaverVideoBlur"] = {false, false}; + mBoolMap["ThemeVariantTriggers"] = {true, true}; mBoolMap["MenuBlurBackground"] = {true, true}; mBoolMap["GamelistVideoPillarbox"] = {true, true}; mBoolMap["GamelistVideoScanlines"] = {false, false};