mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Add option to show/hide 'Restart RetroArch'
This commit is contained in:
parent
7c5d94f924
commit
aa6beb68c2
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user