mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 22:08:34 +00:00
Add a HAVE_LAKKA define, and enable a shutdown menu entry
This commit is contained in:
parent
7b12c57497
commit
2b376ce3d5
@ -392,6 +392,10 @@ ifeq ($(HAVE_XMB), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LAKKA), 1)
|
||||
DEFINES += -DHAVE_LAKKA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
ifeq ($(PSEUDOLOC), 1)
|
||||
PSEUDO_NS := pseudo
|
||||
|
@ -1019,7 +1019,7 @@ bool event_command(enum event_command cmd)
|
||||
driver_t *driver = driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||
rarch_system_info_t *info = rarch_system_info_get_ptr();
|
||||
|
||||
(void)i;
|
||||
|
||||
@ -1411,6 +1411,11 @@ bool event_command(enum event_command cmd)
|
||||
case EVENT_CMD_QUIT_RETROARCH:
|
||||
rarch_ctl(RARCH_ACTION_STATE_FORCE_QUIT, NULL);
|
||||
break;
|
||||
case EVENT_CMD_SHUTDOWN:
|
||||
rarch_main_msg_queue_push("Shutting down...", 1, 180, true);
|
||||
rarch_ctl(RARCH_ACTION_STATE_FORCE_QUIT, NULL);
|
||||
system("shutdown -P now");
|
||||
break;
|
||||
case EVENT_CMD_RESUME:
|
||||
rarch_ctl(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED, NULL);
|
||||
break;
|
||||
@ -1638,11 +1643,11 @@ bool event_command(enum event_command cmd)
|
||||
global->log_file = NULL;
|
||||
break;
|
||||
case EVENT_CMD_DISK_EJECT_TOGGLE:
|
||||
if (system && system->disk_control.get_num_images)
|
||||
if (info && info->disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&system->disk_control;
|
||||
&info->disk_control;
|
||||
|
||||
if (control)
|
||||
event_check_disk_eject(control);
|
||||
@ -1653,11 +1658,11 @@ bool event_command(enum event_command cmd)
|
||||
1, 120, true);
|
||||
break;
|
||||
case EVENT_CMD_DISK_NEXT:
|
||||
if (system && system->disk_control.get_num_images)
|
||||
if (info && info->disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&system->disk_control;
|
||||
&info->disk_control;
|
||||
|
||||
if (!control)
|
||||
return false;
|
||||
@ -1673,11 +1678,11 @@ bool event_command(enum event_command cmd)
|
||||
1, 120, true);
|
||||
break;
|
||||
case EVENT_CMD_DISK_PREV:
|
||||
if (system && system->disk_control.get_num_images)
|
||||
if (info && info->disk_control.get_num_images)
|
||||
{
|
||||
const struct retro_disk_control_callback *control =
|
||||
(const struct retro_disk_control_callback*)
|
||||
&system->disk_control;
|
||||
&info->disk_control;
|
||||
|
||||
if (!control)
|
||||
return false;
|
||||
|
@ -117,6 +117,8 @@ enum event_command
|
||||
EVENT_CMD_RESTART_RETROARCH,
|
||||
/* Force-quit RetroArch. */
|
||||
EVENT_CMD_QUIT_RETROARCH,
|
||||
/* Shutdown the OS */
|
||||
EVENT_CMD_SHUTDOWN,
|
||||
/* Resume RetroArch when in menu. */
|
||||
EVENT_CMD_RESUME,
|
||||
/* Toggles pause. */
|
||||
|
@ -2687,6 +2687,8 @@ static int xmb_list_push(menu_displaylist_info_t *info, unsigned type)
|
||||
menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_QUIT_RETROARCH), PARSE_ACTION);
|
||||
#endif
|
||||
menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_SHUTDOWN), PARSE_ACTION);
|
||||
info->need_push = true;
|
||||
ret = 0;
|
||||
break;
|
||||
|
@ -484,6 +484,8 @@ const char *menu_hash_to_str_fr(uint32_t hash)
|
||||
return "Réglages";
|
||||
case MENU_LABEL_VALUE_QUIT_RETROARCH:
|
||||
return "Quitter RetroArch";
|
||||
case MENU_LABEL_VALUE_SHUTDOWN:
|
||||
return "Éteindre";
|
||||
case MENU_LABEL_VALUE_HELP:
|
||||
return "Aide";
|
||||
case MENU_LABEL_VALUE_SAVE_NEW_CONFIG:
|
||||
|
@ -1176,6 +1176,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
return "Settings";
|
||||
case MENU_LABEL_VALUE_QUIT_RETROARCH:
|
||||
return "Quit RetroArch";
|
||||
case MENU_LABEL_VALUE_SHUTDOWN:
|
||||
return "Shutdown";
|
||||
case MENU_LABEL_VALUE_HELP:
|
||||
return "help";
|
||||
case MENU_LABEL_VALUE_SAVE_NEW_CONFIG:
|
||||
|
@ -642,6 +642,8 @@ extern "C" {
|
||||
#define MENU_LABEL_VALUE_CLOSE_CONTENT 0x2b3d9556U
|
||||
#define MENU_LABEL_QUIT_RETROARCH 0x84b0bc71U
|
||||
#define MENU_LABEL_VALUE_QUIT_RETROARCH 0x8e7024f2U
|
||||
#define MENU_LABEL_SHUTDOWN 0xfc460361U
|
||||
#define MENU_LABEL_VALUE_SHUTDOWN 0x740b6741U
|
||||
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
|
||||
#define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U
|
||||
#define MENU_LABEL_VALUE_STARTING_DOWNLOAD 0x42e10f03U
|
||||
|
@ -3162,6 +3162,16 @@ static bool setting_append_list_main_menu_options(
|
||||
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_QUIT_RETROARCH);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LAKKA)
|
||||
CONFIG_ACTION(
|
||||
menu_hash_to_str(MENU_LABEL_SHUTDOWN),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_SHUTDOWN),
|
||||
group_info.name,
|
||||
subgroup_info.name,
|
||||
parent_group);
|
||||
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_SHUTDOWN);
|
||||
#endif
|
||||
|
||||
for (user = 0; user < MAX_USERS; user++)
|
||||
setting_append_list_input_player_options(list, list_info, parent_group, user);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user