mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
PowerSaver: force-disable sounds for INSTANT profile
This commit is contained in:
parent
1bfcfb1f16
commit
35abc91d30
|
@ -119,7 +119,16 @@ void GuiMenu::openSoundSettings()
|
|||
auto sounds_enabled = std::make_shared<SwitchComponent>(mWindow);
|
||||
sounds_enabled->setState(Settings::getInstance()->getBool("EnableSounds"));
|
||||
s->addWithLabel("ENABLE NAVIGATION SOUNDS", sounds_enabled);
|
||||
s->addSaveFunc([sounds_enabled] { Settings::getInstance()->setBool("EnableSounds", sounds_enabled->getState()); });
|
||||
s->addSaveFunc([sounds_enabled] {
|
||||
if (sounds_enabled->getState()
|
||||
&& !Settings::getInstance()->getBool("EnableSounds")
|
||||
&& PowerSaver::getMode() == PowerSaver::INSTANT)
|
||||
{
|
||||
Settings::getInstance()->setString("PowerSaverMode", "default");
|
||||
PowerSaver::init();
|
||||
}
|
||||
Settings::getInstance()->setBool("EnableSounds", sounds_enabled->getState());
|
||||
});
|
||||
|
||||
auto video_audio = std::make_shared<SwitchComponent>(mWindow);
|
||||
video_audio->setState(Settings::getInstance()->getBool("VideoAudio"));
|
||||
|
@ -300,6 +309,7 @@ void GuiMenu::openOtherSettings()
|
|||
if (Settings::getInstance()->getString("PowerSaverMode") != "instant" && power_saver->getSelected() == "instant") {
|
||||
Settings::getInstance()->setString("TransitionStyle", "instant");
|
||||
Settings::getInstance()->setBool("MoveCarousel", false);
|
||||
Settings::getInstance()->setBool("EnableSounds", false);
|
||||
}
|
||||
Settings::getInstance()->setString("PowerSaverMode", power_saver->getSelected());
|
||||
PowerSaver::init();
|
||||
|
|
Loading…
Reference in a new issue