Implemented setting for showing/hiding the "Quit RetroArch" option in XMB. The setting is only shown on Lakka.

This commit is contained in:
Mikael Brunnhede 2017-10-06 09:27:42 +02:00
parent f073d5167a
commit 9db0e9dbc6
23 changed files with 94 additions and 2 deletions

View File

@ -242,6 +242,7 @@ static bool menu_show_load_content = true;
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;
#if defined(HAVE_LAKKA) || defined(VITA)
static bool menu_show_core_updater = false;

View File

@ -1207,6 +1207,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("menu_show_information", &settings->bools.menu_show_information, true, menu_show_information, false);
SETTING_BOOL("menu_show_configurations", &settings->bools.menu_show_configurations, true, menu_show_configurations, false);
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_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false);
SETTING_BOOL("menu_show_core_updater", &settings->bools.menu_show_core_updater, true, menu_show_core_updater, false);
#ifdef HAVE_FFMPEG

View File

@ -132,6 +132,7 @@ typedef struct settings
bool menu_show_information;
bool menu_show_configurations;
bool menu_show_help;
bool menu_show_quit_retroarch;
bool menu_materialui_icons_enable;
bool menu_xmb_shadows_enable;
bool menu_xmb_show_settings;

View File

@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3083,3 +3083,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3077,3 +3077,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3115,3 +3115,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3169,3 +3169,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3085,3 +3085,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3078,3 +3078,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -1315,3 +1315,5 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS,
"menu_show_configurations")
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_HELP,
"menu_show_help")
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH,
"menu_show_quit_retroarch")

View File

@ -2946,3 +2946,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -4018,3 +4018,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option."
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch"
)
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option."
)

View File

@ -3053,3 +3053,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3136,3 +3136,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3171,3 +3171,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -3107,3 +3107,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.")

View File

@ -296,6 +296,7 @@ default_sublabel_macro(action_bind_sublabel_menu_show_load_content,
default_sublabel_macro(action_bind_sublabel_menu_show_information, MENU_ENUM_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)
default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER)
default_sublabel_macro(action_bind_sublabel_menu_show_core_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER)
default_sublabel_macro(action_bind_sublabel_menu_music_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC)
@ -620,6 +621,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MENU_SHOW_HELP:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_help);
break;
case MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_quit_retroarch);
break;
case MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_online_updater);
break;

View File

@ -4377,8 +4377,11 @@ static int xmb_list_push(void *data, void *userdata,
}
#if !defined(IOS)
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
if (settings->bools.menu_show_quit_retroarch)
{
entry.enum_idx = MENU_ENUM_LABEL_QUIT_RETROARCH;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
}
#endif
entry.enum_idx = MENU_ENUM_LABEL_REBOOT;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);

View File

@ -5307,6 +5307,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_MENU_SHOW_HELP,
PARSE_ONLY_BOOL, false);
#if defined(HAVE_LAKKA)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH,
PARSE_ONLY_BOOL, false);
#endif
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
PARSE_ONLY_BOOL, false);

View File

@ -5454,6 +5454,21 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_LAKKA_ADVANCED);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_show_quit_retroarch,
MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH,
MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
menu_show_quit_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);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_xmb_show_settings,

View File

@ -677,6 +677,7 @@ enum msg_hash_enums
MENU_LABEL(MENU_SHOW_INFORMATION),
MENU_LABEL(MENU_SHOW_CONFIGURATIONS),
MENU_LABEL(MENU_SHOW_HELP),
MENU_LABEL(MENU_SHOW_QUIT_RETROARCH),
MENU_LABEL(MENU_SHOW_ONLINE_UPDATER),
MENU_LABEL(MENU_SHOW_CORE_UPDATER),
MENU_LABEL(RUN_MUSIC),