User the POWER button as an alternative to HOME

This commit is contained in:
d0k3 2017-08-01 17:04:06 +02:00
parent 90a7705d21
commit e576baa601

View File

@ -1949,15 +1949,12 @@ u32 GodMode() {
if (pad_state & BUTTON_START) { if (pad_state & BUTTON_START) {
exit_mode = (switched || (pad_state & BUTTON_LEFT)) ? GODMODE_EXIT_POWEROFF : GODMODE_EXIT_REBOOT; exit_mode = (switched || (pad_state & BUTTON_LEFT)) ? GODMODE_EXIT_POWEROFF : GODMODE_EXIT_REBOOT;
break; break;
} else if (pad_state & BUTTON_POWER) { } else if (pad_state & (BUTTON_HOME|BUTTON_POWER)) { // Home menu
exit_mode = GODMODE_EXIT_POWEROFF;
break;
} else if (pad_state & BUTTON_HOME) { // Home menu
const char* optionstr[] = { "Poweroff system", "Reboot system", "More..." }; const char* optionstr[] = { "Poweroff system", "Reboot system", "More..." };
const char* promptstr = "HOME button pressed.\nSelect action:"; const char* buttonstr = (pad_state & BUTTON_HOME) ? "HOME" : "POWER";
u32 n_opt = 3; u32 n_opt = 3;
u32 user_select = 0; u32 user_select = 0;
while (((user_select = ShowSelectPrompt(n_opt, optionstr, promptstr)) == 3) && while (((user_select = ShowSelectPrompt(n_opt, optionstr, "%s button pressed.\nSelect action:", buttonstr)) == 3) &&
(HomeMoreMenu(current_path, current_dir, clipboard) == 1)); // more... menu (HomeMoreMenu(current_path, current_dir, clipboard) == 1)); // more... menu
if (user_select == 1) { if (user_select == 1) {
exit_mode = GODMODE_EXIT_POWEROFF; exit_mode = GODMODE_EXIT_POWEROFF;