You've already forked emulationstation-next
mirror of
https://github.com/archr-linux/emulationstation-next.git
synced 2026-07-13 03:19:12 -07:00
menu: default the power LED selection to on, matching the boot state
With option_powerled unset the option list preselected heartbeat, but the DTS boots the LED solid on and nothing applies a mode until the user saves one, so the menu claimed heartbeat while the LED sat static. Preselect "on" for the unset case and use it as the re-enable fallback of DISABLE POWER LED too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1817,7 +1817,7 @@ void GuiMenu::openSystemSettings()
|
||||
// restores the POWER LED COLOR choice (heartbeat when unset).
|
||||
std::string mode = pwrleddisabled ? "off" : SystemConf::getInstance()->get("option_powerled");
|
||||
if (mode.empty())
|
||||
mode = "heartbeat";
|
||||
mode = "on";
|
||||
std::thread([mode] { ApiSystem::getInstance()->setPowerLedGameForce(mode); }).detach();
|
||||
});
|
||||
}
|
||||
@@ -2473,9 +2473,11 @@ void GuiMenu::openSystemSettings()
|
||||
});
|
||||
|
||||
auto powerled_GameForce = std::make_shared< OptionListComponent<std::string> >(mWindow, _("POWER LED COLOR"));
|
||||
powerled_GameForce->add(_("heartbeat"), "heartbeat", SystemConf::getInstance()->get("option_powerled") == "heartbeat" || SystemConf::getInstance()->get("option_powerled") == "");
|
||||
powerled_GameForce->add(_("heartbeat"), "heartbeat", SystemConf::getInstance()->get("option_powerled") == "heartbeat");
|
||||
powerled_GameForce->add(_("off"), "off", SystemConf::getInstance()->get("option_powerled") == "off");
|
||||
powerled_GameForce->add(_("on"), "on", SystemConf::getInstance()->get("option_powerled") == "on");
|
||||
// The DTS boots the LED solid on, so an unset conf must show "on" or
|
||||
// the menu claims heartbeat while the LED sits static.
|
||||
powerled_GameForce->add(_("on"), "on", SystemConf::getInstance()->get("option_powerled") == "on" || SystemConf::getInstance()->get("option_powerled") == "");
|
||||
s->addWithLabel(_("POWER LED COLOR"), powerled_GameForce);
|
||||
s->addSaveFunc([powerled_GameForce]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user