(XMB) Allow hidding the netplay tab

This commit is contained in:
Jean-André Santoni 2017-02-27 23:32:24 +01:00
parent 834087d1ad
commit 64a11ca0f4
10 changed files with 40 additions and 2 deletions

View File

@ -623,6 +623,9 @@ static bool xmb_show_images = true;
static bool xmb_show_music = true;
static bool xmb_show_video = true;
#endif
#ifdef HAVE_NETWORKING
static bool xmb_show_netplay = true;
#endif
static bool xmb_show_history = true;
#ifdef HAVE_LIBRETRODB
static bool xmb_show_add = true;

View File

@ -812,6 +812,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#ifdef HAVE_FFMPEG
SETTING_BOOL("xmb_show_music", &settings->menu.xmb.show_music, true, xmb_show_music, false);
SETTING_BOOL("xmb_show_video", &settings->menu.xmb.show_video, true, xmb_show_video, false);
#endif
#ifdef HAVE_NETWORKING
SETTING_BOOL("xmb_show_netplay", &settings->menu.xmb.show_netplay, true, xmb_show_netplay, false);
#endif
SETTING_BOOL("xmb_show_history", &settings->menu.xmb.show_history, true, xmb_show_history, false);
#ifdef HAVE_LIBRETRODB

View File

@ -198,6 +198,7 @@ typedef struct settings
bool show_images;
bool show_music;
bool show_video;
bool show_netplay;
bool show_history;
bool show_add;
} xmb;

View File

@ -1117,6 +1117,8 @@ MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
"xmb_show_settings")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_VIDEO,
"xmb_show_video")
MSG_HASH(MENU_ENUM_LABEL_XMB_SHOW_NETPLAY,
"xmb_show_netplay")
MSG_HASH(MENU_ENUM_LABEL_XMB_THEME,
"xmb_theme")
MSG_HASH(MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT,

View File

@ -1711,6 +1711,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS,
"Display Settings Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO,
"Display Video Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_NETPLAY,
"Display Netplay Tab")
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_THEME,
"Menu Icon Theme")
MSG_HASH(MENU_ENUM_LABEL_VALUE_YES,
@ -2845,6 +2847,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC,
"Show the music tab inside the main menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_VIDEO,
"Show the video tab inside the main menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_NETPLAY,
"Show the netplay tab inside the main menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_SETTINGS,
"Show the settings tab inside the main menu.")
MSG_HASH(MENU_ENUM_SUBLABEL_XMB_SHOW_HISTORY,

View File

@ -268,6 +268,7 @@ default_sublabel_macro(action_bind_sublabel_menu_font,
default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES)
default_sublabel_macro(action_bind_sublabel_menu_music_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC)
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_history_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_HISTORY)
default_sublabel_macro(action_bind_sublabel_menu_import_content_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_ADD)

View File

@ -3232,7 +3232,8 @@ static void *xmb_init(void **userdata)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_VIDEO;
#endif
#ifdef HAVE_NETWORKING
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY;
if (settings->menu.xmb.show_netplay)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY;
#endif
#ifdef HAVE_LIBRETRODB
if (settings->menu.xmb.show_add)

View File

@ -4662,6 +4662,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_VIDEO,
PARSE_ONLY_BOOL, false);
#endif
#ifdef HAVE_NETWORKING
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_NETPLAY,
PARSE_ONLY_BOOL, false);
#endif
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_HISTORY,

View File

@ -5138,7 +5138,24 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_NETWORKING
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_netplay,
MENU_ENUM_LABEL_XMB_SHOW_NETPLAY,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_NETPLAY,
xmb_show_netplay,
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
#ifdef HAVE_LIBRETRODB
CONFIG_BOOL(
list, list_info,

View File

@ -661,6 +661,7 @@ enum msg_hash_enums
MENU_LABEL(XMB_SHOW_IMAGES),
MENU_LABEL(XMB_SHOW_MUSIC),
MENU_LABEL(XMB_SHOW_VIDEO),
MENU_LABEL(XMB_SHOW_NETPLAY),
MENU_LABEL(XMB_SHOW_HISTORY),
MENU_LABEL(XMB_SHOW_ADD),
MENU_LABEL(XMB_RIBBON_ENABLE),