Merge pull request #5479 from Brunnis/master

Add XMB menu option to show the Settings tab if it has previously been hidden
This commit is contained in:
Twinaphex 2017-09-26 16:51:50 +02:00 committed by GitHub
commit 8ec326a43f
23 changed files with 312 additions and 7 deletions

View File

@ -990,6 +990,7 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
/* Paths */
#ifdef HAVE_XMB
SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true);
SETTING_PATH("xmb_show_settings_password", settings->paths.menu_xmb_show_settings_password, false, NULL, true);
#endif
SETTING_PATH("netplay_nickname", settings->paths.username, false, NULL, true);
SETTING_PATH("video_filter", settings->paths.path_softfilter_plugin, false, NULL, true);

View File

@ -379,6 +379,7 @@ typedef struct settings
#ifdef HAVE_MENU
char path_menu_xmb_font[PATH_MAX_LENGTH];
char menu_xmb_show_settings_password[PATH_MAX_LENGTH];
#endif
char path_cheat_database[PATH_MAX_LENGTH];
char path_content_database[PATH_MAX_LENGTH];

View File

@ -1,4 +1,4 @@
MSG_HASH(
MSG_HASH(
MSG_COMPILER,
"编译器"
)
@ -3045,3 +3045,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1,4 +1,4 @@
MSG_HASH(
MSG_HASH(
MSG_COMPILER,
"編譯器"
)
@ -3045,3 +3045,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -3039,3 +3039,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -2908,3 +2908,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -3077,3 +3077,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -3131,3 +3131,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Icone del Menu")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Abilita/disabilita le icone del menu visualizzate sul lato sinistro di ogni voce.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1,4 +1,4 @@
#if defined(_MSC_VER) && !defined(_XBOX)
#if defined(_MSC_VER) && !defined(_XBOX)
/* https://support.microsoft.com/en-us/kb/980263 */
#pragma execution_character_set("utf-8")
#endif
@ -3031,3 +3031,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1,4 +1,4 @@
MSG_HASH(
MSG_HASH(
MSG_COMPILER,
"컴파일러"
)
@ -3040,3 +3040,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1151,6 +1151,8 @@ MSG_HASH(MENU_ENUM_LABEL_XMB_ALPHA_FACTOR,
"xmb_alpha_factor")
MSG_HASH(MENU_ENUM_LABEL_XMB_FONT,
"xmb_font")
MSG_HASH(MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"xmb_main_menu_enable_settings")
MSG_HASH(MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME,
"xmb_menu_color_theme")
MSG_HASH(MENU_ENUM_LABEL_XMB_RIBBON_ENABLE,
@ -1171,6 +1173,8 @@ MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_MUSIC,
"xmb_show_music")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
"xmb_show_settings")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD,
"xmb_show_settings_password")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_VIDEO,
"xmb_show_video")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_NETPLAY,

View File

@ -2908,3 +2908,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -3960,4 +3960,25 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
)
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Habilitar/desabilitar os ícones exibidos do lado esquerdo dos itens de menu. "
)
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab"
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab"
)
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password"
)
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct."
)
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect."
)
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear."
)
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password."
)

View File

@ -3015,3 +3015,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1,4 +1,4 @@
#if defined(_MSC_VER) && !defined(_XBOX)
#if defined(_MSC_VER) && !defined(_XBOX)
/* https://support.microsoft.com/en-us/kb/980263 */
#pragma execution_character_set("utf-8")
#endif
@ -3098,3 +3098,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Иконки интерфейса")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Отображать или скрывать иконки интерфейса, отображающиеся в левой части меню.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -3133,3 +3133,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1,4 +1,4 @@
MSG_HASH(
MSG_HASH(
MSG_COMPILER,
"Compiler"
)
@ -3069,3 +3069,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE,
"Menu Icons")
MSG_HASH(MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE,
"Enable/disable the menu icons shown at the lefthand side of the menu entries.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enable Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"Set Password For Enabling Settings Tab")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
"Enter Password")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
"Password correct.")
MSG_HASH(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
"Password incorrect.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
"Enables the Settings tab. A restart is required for the tab to appear.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD,
"Supplying a password when hiding the settings tab makes it possible to later restore it from the menu, by going to the Main Menu tab, selecting Enable Settings Tab and entering the password.")

View File

@ -1939,6 +1939,33 @@ static void menu_input_st_string_cb_rename_entry(void *userdata,
menu_input_dialog_end();
}
static void menu_input_st_string_cb_enable_settings(void *userdata,
const char *str)
{
if (str && *str)
{
const char *label = menu_input_dialog_get_buffer();
settings_t *settings = config_get_ptr();
if (string_is_equal(label, settings->paths.menu_xmb_show_settings_password))
{
settings->bools.menu_xmb_show_settings = true;
runloop_msg_queue_push(
msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK),
1, 100, true);
}
else
{
runloop_msg_queue_push(
msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK),
1, 100, true);
}
}
menu_input_dialog_end();
}
static void menu_input_st_string_cb_save_preset(void *userdata,
const char *str)
{
@ -3200,6 +3227,22 @@ static int action_ok_delete_entry(const char *path,
return 0;
}
static int action_ok_enable_settings(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
menu_input_ctx_line_t line;
line.label = msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD);
line.label_setting = label;
line.type = type;
line.idx = (unsigned)entry_idx;
line.cb = menu_input_st_string_cb_enable_settings;
if (!menu_input_dialog_start(&line))
return -1;
return 0;
}
static int action_ok_rdb_entry_submenu(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -4309,6 +4352,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_DELETE_ENTRY:
BIND_ACTION_OK(cbs, action_ok_delete_entry);
break;
case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_enable_settings);
break;
case MENU_ENUM_LABEL_QUIT_RETROARCH:
BIND_ACTION_OK(cbs, action_ok_quit);
break;

View File

@ -296,8 +296,10 @@ default_sublabel_macro(action_bind_sublabel_menu_music_tab,
default_sublabel_macro(action_bind_sublabel_menu_video_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_VIDEO)
default_sublabel_macro(action_bind_sublabel_menu_netplay_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_NETPLAY)
default_sublabel_macro(action_bind_sublabel_menu_settings_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS)
default_sublabel_macro(action_bind_sublabel_menu_settings_tab_enable_password, MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS_PASSWORD)
default_sublabel_macro(action_bind_sublabel_menu_history_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_HISTORY)
default_sublabel_macro(action_bind_sublabel_menu_import_content_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_ADD)
default_sublabel_macro(action_bind_sublabel_main_menu_enable_settings, MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_rgui_show_start_screen, MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN)
default_sublabel_macro(action_bind_sublabel_menu_header_opacity, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_HEADER_OPACITY)
default_sublabel_macro(action_bind_sublabel_menu_footer_opacity, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_FOOTER_OPACITY)
@ -559,12 +561,18 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_XMB_SHOW_ADD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_import_content_tab);
break;
case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_main_menu_enable_settings);
break;
case MENU_ENUM_LABEL_XMB_SHOW_HISTORY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_history_tab);
break;
case MENU_ENUM_LABEL_XMB_SHOW_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_tab);
break;
case MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_settings_tab_enable_password);
break;
case MENU_ENUM_LABEL_GOTO_IMAGES:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_images);
break;

View File

@ -4331,6 +4331,14 @@ static int xmb_list_push(void *data, void *userdata,
}
}
#endif
settings_t *settings = config_get_ptr();
if (!settings->bools.menu_xmb_show_settings && !string_is_empty(settings->paths.menu_xmb_show_settings_password))
{
entry.enum_idx = MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
}
entry.enum_idx = MENU_ENUM_LABEL_INFORMATION_LIST;
menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry);
#ifndef HAVE_DYNAMIC

View File

@ -5283,6 +5283,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD,
PARSE_ONLY_STRING, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_FAVORITES,
PARSE_ONLY_BOOL, false);
@ -6367,6 +6371,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_START_CORE, PARSE_ACTION, false);
}
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
PARSE_ACTION, false);
#ifndef HAVE_DYNAMIC
if (frontend_driver_has_fork())

View File

@ -2280,6 +2280,14 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
#ifndef HAVE_DYNAMIC
if (frontend_driver_has_fork())
#endif
@ -5388,6 +5396,20 @@ static bool setting_append_list(
SD_FLAG_NONE);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_STRING(
list, list_info,
settings->paths.menu_xmb_show_settings_password,
sizeof(settings->paths.menu_xmb_show_settings_password),
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS_PASSWORD,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS_PASSWORD,
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_LAKKA_ADVANCED);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_xmb_show_favorites,

View File

@ -290,6 +290,9 @@ enum msg_hash_enums
MSG_INPUT_PRESET_FILENAME,
MSG_INPUT_CHEAT_FILENAME,
MSG_INPUT_RENAME_ENTRY,
MSG_INPUT_ENABLE_SETTINGS_PASSWORD,
MSG_INPUT_ENABLE_SETTINGS_PASSWORD_OK,
MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK,
MSG_REMAP_FILE_SAVED_SUCCESSFULLY,
MSG_REMAP_FILE_REMOVED_SUCCESSFULLY,
MSG_SHADER_PRESET_SAVED_SUCCESSFULLY,
@ -689,9 +692,11 @@ enum msg_hash_enums
MENU_LABEL(XMB_SCALE_FACTOR),
MENU_LABEL(XMB_FONT),
MENU_LABEL(XMB_THEME),
MENU_LABEL(XMB_MAIN_MENU_ENABLE_SETTINGS),
MENU_LABEL(XMB_MENU_COLOR_THEME),
MENU_LABEL(XMB_SHADOWS_ENABLE),
MENU_LABEL(XMB_SHOW_SETTINGS),
MENU_LABEL(XMB_SHOW_SETTINGS_PASSWORD),
MENU_LABEL(XMB_SHOW_FAVORITES),
MENU_LABEL(XMB_SHOW_IMAGES),
MENU_LABEL(XMB_SHOW_MUSIC),