Skip to content

Commit

Permalink
Add "Halt System" menu entry
Browse files Browse the repository at this point in the history
  • Loading branch information
neagix committed May 5, 2013
1 parent 5064bb3 commit 8584262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/menu/menu_common.h
Expand Up @@ -165,6 +165,7 @@ typedef enum
RGUI_SETTINGS_DEBUG_TEXT,
RGUI_SETTINGS_RESTART_EMULATOR,
RGUI_SETTINGS_RESUME_GAME,
RGUI_SETTINGS_HALT_SYSTEM,
RGUI_SETTINGS_QUIT_RARCH,

RGUI_SETTINGS_BIND_PLAYER,
Expand Down
4 changes: 4 additions & 0 deletions frontend/menu/rgui.c
Expand Up @@ -981,6 +981,9 @@ static int rgui_settings_toggle_setting(rgui_handle_t *rgui, unsigned setting, r
return -1;
}
break;
case RGUI_SETTINGS_HALT_SYSTEM:
system("sudo halt");
//fallback wanted
case RGUI_SETTINGS_QUIT_RARCH:
if (action == RGUI_ACTION_OK)
{
Expand Down Expand Up @@ -1241,6 +1244,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
#ifndef HAVE_DYNAMIC
rgui_list_push(rgui->selection_buf, "Restart RetroArch", RGUI_SETTINGS_RESTART_EMULATOR, 0);
#endif
rgui_list_push(rgui->selection_buf, "Halt System", RGUI_SETTINGS_HALT_SYSTEM, 0);
rgui_list_push(rgui->selection_buf, "Quit RetroArch", RGUI_SETTINGS_QUIT_RARCH, 0);
}

Expand Down

0 comments on commit 8584262

Please sign in to comment.