gui: Actions: Toggle backlight on power key

Create GUIAction to handle KEY_POWER with a screen backlight toggle.

Change-Id: Iad0a7923b4a776e0336722db74d6fc46cd0107a2
This commit is contained in:
Matt Mower
2016-01-20 18:12:47 -06:00
committed by Dees Troy
parent 874136434a
commit 9472ba1d39
13 changed files with 69 additions and 6 deletions
+7
View File
@@ -198,6 +198,7 @@ GUIAction::GUIAction(xml_node<>* node)
ADD_ACTION(mountsystemtoggle);
ADD_ACTION(setlanguage);
ADD_ACTION(checkforapp);
ADD_ACTION(togglebacklight);
// remember actions that run in the caller thread
for (mapFunc::const_iterator it = mf.begin(); it != mf.end(); ++it)
@@ -1865,6 +1866,12 @@ int GUIAction::setlanguage(std::string arg __unused)
return 0;
}
int GUIAction::togglebacklight(std::string arg __unused)
{
blankTimer.toggleBlank();
return 0;
}
int GUIAction::setbootslot(std::string arg)
{
operation_start("Set Boot Slot");