desktop: prompt to power off on back button long press (#1279)
* desktop: prompt to power off on back button long press Implemented by launching Power Settings app, passing "off" as arg to directly jump to "power off" scene.
This commit is contained in:
@@ -8,6 +8,7 @@ typedef enum {
|
||||
DesktopMainEventOpenMenu,
|
||||
DesktopMainEventOpenDebug,
|
||||
DesktopMainEventOpenPassport, /**< Broken, don't use it */
|
||||
DesktopMainEventOpenPowerOff,
|
||||
|
||||
DesktopLockedEventUnlocked,
|
||||
DesktopLockedEventUpdate,
|
||||
|
@@ -53,6 +53,8 @@ bool desktop_main_input(InputEvent* event, void* context) {
|
||||
main_view->callback(DesktopMainEventOpenDebug, main_view->context);
|
||||
} else if(event->key == InputKeyLeft) {
|
||||
main_view->callback(DesktopMainEventOpenFavoriteSecondary, main_view->context);
|
||||
} else if(event->key == InputKeyBack) {
|
||||
main_view->callback(DesktopMainEventOpenPowerOff, main_view->context);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user