diff --git a/config.def.h b/config.def.h index bee23ffabe..49d29f4a8f 100644 --- a/config.def.h +++ b/config.def.h @@ -322,6 +322,7 @@ static bool menu_show_information = true; static bool menu_show_configurations = true; static bool menu_show_help = true; static bool menu_show_quit_retroarch = true; +static bool menu_show_restart_retroarch = true; static bool menu_show_reboot = true; static bool menu_show_shutdown = true; #if defined(HAVE_LAKKA) || defined(VITA) || defined(_3DS) diff --git a/configuration.c b/configuration.c index ea60450878..325b423bc4 100644 --- a/configuration.c +++ b/configuration.c @@ -1523,6 +1523,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, #endif SETTING_BOOL("menu_show_help", &settings->bools.menu_show_help, true, menu_show_help, false); SETTING_BOOL("menu_show_quit_retroarch", &settings->bools.menu_show_quit_retroarch, true, menu_show_quit_retroarch, false); + SETTING_BOOL("menu_show_restart_retroarch", &settings->bools.menu_show_restart_retroarch, true, menu_show_restart_retroarch, false); SETTING_BOOL("menu_show_reboot", &settings->bools.menu_show_reboot, true, menu_show_reboot, false); SETTING_BOOL("menu_show_shutdown", &settings->bools.menu_show_shutdown, true, menu_show_shutdown, false); SETTING_BOOL("menu_show_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false); diff --git a/configuration.h b/configuration.h index b8f4fadee1..5662344110 100644 --- a/configuration.h +++ b/configuration.h @@ -166,6 +166,7 @@ typedef struct settings bool menu_show_configurations; bool menu_show_help; bool menu_show_quit_retroarch; + bool menu_show_restart_retroarch; bool menu_show_reboot; bool menu_show_shutdown; bool menu_show_latency; diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 9b3dbed210..af24385026 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -1559,6 +1559,8 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_HELP, "menu_show_help") MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH, "menu_show_quit_retroarch") +MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_RESTART_RETROARCH, + "menu_show_restart_retroarch") MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_REBOOT, "menu_show_reboot") MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_SHUTDOWN, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index fadd119110..a858fea710 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -6714,6 +6714,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, "Show/hide the 'Quit RetroArch' option." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_RESTART_RETROARCH, + "Show Restart RetroArch" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_RESTART_RETROARCH, + "Show/hide the 'Restart RetroArch' option." + ) #endif MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 04eadbdc1b..925c5d2e6d 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -479,6 +479,9 @@ default_sublabel_macro(action_bind_sublabel_menu_show_information, default_sublabel_macro(action_bind_sublabel_menu_show_configurations, MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS) default_sublabel_macro(action_bind_sublabel_menu_show_help, MENU_ENUM_SUBLABEL_MENU_SHOW_HELP) default_sublabel_macro(action_bind_sublabel_menu_show_quit_retroarch, MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH) +#ifndef HAVE_LAKKA +default_sublabel_macro(action_bind_sublabel_menu_show_restart_retroarch, MENU_ENUM_SUBLABEL_MENU_SHOW_RESTART_RETROARCH) +#endif default_sublabel_macro(action_bind_sublabel_menu_show_reboot, MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT) default_sublabel_macro(action_bind_sublabel_menu_show_shutdown, MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN) default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER) @@ -1396,6 +1399,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_quit_retroarch); break; +#ifndef HAVE_LAKKA + case MENU_ENUM_LABEL_MENU_SHOW_RESTART_RETROARCH: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_restart_retroarch); + break; +#endif case MENU_ENUM_LABEL_MENU_SHOW_REBOOT: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_reboot); break; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 6cd8b6081d..8ac2baa5d4 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -2136,10 +2136,7 @@ static int materialui_list_push(void *data, void *userdata, entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST; menu_displaylist_setting(&entry); } -#ifndef HAVE_DYNAMIC - entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; - menu_displaylist_setting(&entry); -#endif + if (settings->bools.menu_show_configurations) { entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST; @@ -2152,6 +2149,13 @@ static int materialui_list_push(void *data, void *userdata, menu_displaylist_setting(&entry); } #if !defined(IOS) + + if (settings->bools.menu_show_restart_retroarch) + { + entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; + menu_displaylist_setting(&entry); + } + entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH; menu_displaylist_setting(&entry); #endif diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index 83faeaf3f8..ad9a85633f 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -924,11 +924,6 @@ static int ozone_list_push(void *data, void *userdata, menu_displaylist_setting(&entry); #endif -#ifndef HAVE_DYNAMIC - entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; - menu_displaylist_setting(&entry); -#endif - if (settings->bools.menu_show_configurations && !settings->bools.kiosk_mode_enable) { entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST; @@ -942,7 +937,7 @@ static int ozone_list_push(void *data, void *userdata, } #if !defined(IOS) - if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork()) + if (settings->bools.menu_show_restart_retroarch) { entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; menu_displaylist_setting(&entry); diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c index af26de9df7..88f2d50522 100644 --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -4309,8 +4309,11 @@ static int stripes_list_push(void *data, void *userdata, } #ifndef HAVE_DYNAMIC - entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; - menu_displaylist_setting(&entry); + if (settings->bools.menu_show_restart_retroarch) + { + entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; + menu_displaylist_setting(&entry); + } #endif if (settings->bools.menu_show_configurations && !settings->bools.kiosk_mode_enable) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 37d91ae54d..dd59727a49 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -5695,11 +5695,6 @@ static int xmb_list_push(void *data, void *userdata, menu_displaylist_setting(&entry); #endif -#ifndef HAVE_DYNAMIC - entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; - menu_displaylist_setting(&entry); -#endif - if (settings->bools.menu_show_configurations && !settings->bools.kiosk_mode_enable) { entry.enum_idx = MENU_ENUM_LABEL_CONFIGURATIONS_LIST; @@ -5713,7 +5708,7 @@ static int xmb_list_push(void *data, void *userdata, } #if !defined(IOS) - if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork()) + if (settings->bools.menu_show_restart_retroarch) { entry.enum_idx = MENU_ENUM_LABEL_RESTART_RETROARCH; menu_displaylist_setting(&entry); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6c252371bb..ba40aa41cc 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3800,6 +3800,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct {MENU_ENUM_LABEL_MENU_SHOW_HELP, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_SHOW_WIMP, PARSE_ONLY_UINT }, {MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH, PARSE_ONLY_BOOL }, + {MENU_ENUM_LABEL_MENU_SHOW_RESTART_RETROARCH, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_MENU_SHOW_REBOOT, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_MENU_SHOW_SHUTDOWN, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS, PARSE_ONLY_BOOL }, @@ -6901,7 +6902,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, PARSE_ACTION, false) == 0) count++; - if (settings->bools.menu_show_quit_retroarch && frontend_driver_has_fork()) + if (settings->bools.menu_show_restart_retroarch) if (menu_displaylist_parse_settings_enum(info->list, MENU_ENUM_LABEL_RESTART_RETROARCH, PARSE_ACTION, false) == 0) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 1e9c97f21a..a961f7017e 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -6649,14 +6649,17 @@ static bool setting_append_list( &subgroup_info, parent_group); - CONFIG_ACTION( - list, list_info, - MENU_ENUM_LABEL_RESTART_RETROARCH, - MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH, - &group_info, - &subgroup_info, - parent_group); - menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_RESTART_RETROARCH); +#if !defined(IOS) + if (frontend_driver_has_fork()) + CONFIG_ACTION( + list, list_info, + MENU_ENUM_LABEL_RESTART_RETROARCH, + MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH, + &group_info, + &subgroup_info, + parent_group); + menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_RESTART_RETROARCH); +#endif CONFIG_ACTION( list, list_info, @@ -11797,6 +11800,24 @@ static bool setting_append_list( general_write_handler, general_read_handler, SD_FLAG_NONE); +#else +#if !defined(IOS) + if (frontend_driver_has_fork()) + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_show_restart_retroarch, + MENU_ENUM_LABEL_MENU_SHOW_RESTART_RETROARCH, + MENU_ENUM_LABEL_VALUE_MENU_SHOW_RESTART_RETROARCH, + menu_show_restart_retroarch, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); +#endif #endif #if defined(HAVE_XMB) || defined(HAVE_OZONE) diff --git a/msg_hash.h b/msg_hash.h index fd082d4517..da0531855b 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -870,6 +870,7 @@ enum msg_hash_enums MENU_LABEL(MENU_SHOW_CONFIGURATIONS), MENU_LABEL(MENU_SHOW_HELP), MENU_LABEL(MENU_SHOW_QUIT_RETROARCH), + MENU_LABEL(MENU_SHOW_RESTART_RETROARCH), MENU_LABEL(MENU_SHOW_REBOOT), MENU_LABEL(MENU_SHOW_SHUTDOWN), MENU_LABEL(MENU_SHOW_ONLINE_UPDATER),