From 46029bef220c19374fe1f3393656d95c366f99e7 Mon Sep 17 00:00:00 2001 From: Ghost Coder Date: Sat, 6 Aug 2016 04:08:21 -0500 Subject: [PATCH] Reworked xmb driver to allow tab hiding --- config.def.h | 7 ++ configuration.c | 21 ++++ configuration.h | 7 ++ intl/msg_hash_us.c | 28 +++++ menu/drivers/xmb.c | 254 ++++++++++++++++++++++------------------ menu/menu_displaylist.c | 21 ++++ menu/menu_setting.c | 112 ++++++++++++++++++ msg_hash.h | 14 +++ 8 files changed, 349 insertions(+), 115 deletions(-) diff --git a/config.def.h b/config.def.h index 5d7e7184eb..540e695013 100644 --- a/config.def.h +++ b/config.def.h @@ -528,6 +528,13 @@ static bool xmb_shadows_enable = false; #else static bool xmb_shadows_enable = true; #endif +static bool xmb_hide_main = false; +static bool xmb_hide_settings = false; +static bool xmb_hide_images = false; +static bool xmb_hide_music = false; +static bool xmb_hide_video = false; +static bool xmb_hide_history = false; +static bool xmb_hide_import = false; #endif static float menu_wallpaper_opacity = 0.300; diff --git a/configuration.c b/configuration.c index d35a92e39b..1cce28a6e9 100644 --- a/configuration.c +++ b/configuration.c @@ -494,6 +494,13 @@ static void config_set_defaults(void) settings->menu.xmb.theme = xmb_icon_theme; settings->menu.xmb.menu_color_theme = menu_background_gradient; settings->menu.xmb.shadows_enable = xmb_shadows_enable; + settings->menu.xmb.hide_main = xmb_hide_main; + settings->menu.xmb.hide_settings = xmb_hide_settings; + settings->menu.xmb.hide_images = xmb_hide_images; + settings->menu.xmb.hide_music = xmb_hide_music; + settings->menu.xmb.hide_video = xmb_hide_video; + settings->menu.xmb.hide_history = xmb_hide_history; + settings->menu.xmb.hide_import = xmb_hide_import; settings->menu.xmb.shader_pipeline = menu_shader_pipeline; settings->menu.xmb.font[0] = '\0'; #endif @@ -1318,6 +1325,13 @@ static bool config_load_file(const char *path, bool set_defaults) #endif { "rgui_show_start_screen", &settings->menu_show_start_screen}, { "xmb_shadows_enable", &settings->menu.xmb.shadows_enable}, + { "xmb_hide_main", &settings->menu.xmb.hide_main}, + { "xmb_hide_settings", &settings->menu.xmb.hide_settings}, + { "xmb_hide_images", &settings->menu.xmb.hide_images}, + { "xmb_hide_music", &settings->menu.xmb.hide_music}, + { "xmb_hide_video", &settings->menu.xmb.hide_video}, + { "xmb_hide_history", &settings->menu.xmb.hide_history}, + { "xmb_hide_import", &settings->menu.xmb.hide_import}, { "menu_throttle_framerate", &settings->menu.throttle_framerate}, { "menu_linear_filter", &settings->menu.linear_filter}, { "menu_pause_libretro", &settings->menu.pause_libretro}, @@ -2859,6 +2873,13 @@ bool config_save_file(const char *path) { "menu_core_enable", settings->menu.core_enable}, { "menu_dynamic_wallpaper_enable",settings->menu.dynamic_wallpaper_enable}, { "xmb_shadows_enable", settings->menu.xmb.shadows_enable}, + { "xmb_hide_main", settings->menu.xmb.hide_main}, + { "xmb_hide_settings", settings->menu.xmb.hide_settings}, + { "xmb_hide_images", settings->menu.xmb.hide_images}, + { "xmb_hide_music", settings->menu.xmb.hide_music}, + { "xmb_hide_video", settings->menu.xmb.hide_video}, + { "xmb_hide_history", settings->menu.xmb.hide_history}, + { "xmb_hide_import", settings->menu.xmb.hide_import}, { "rgui_show_start_screen", settings->menu_show_start_screen}, { "menu_navigation_wraparound_enable", settings->menu.navigation.wraparound.enable}, { "menu_navigation_browser_filter_supported_extensions_enable", diff --git a/configuration.h b/configuration.h index 42971cf2ee..fa043ad1d9 100644 --- a/configuration.h +++ b/configuration.h @@ -234,6 +234,13 @@ typedef struct settings unsigned theme; unsigned menu_color_theme; bool shadows_enable; + bool hide_main; + bool hide_settings; + bool hide_images; + bool hide_music; + bool hide_video; + bool hide_history; + bool hide_import; } xmb; struct diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index fbb10a1130..143ca324bd 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -2426,6 +2426,20 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) return "materialui_menu_footer_opacity"; case MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE: return "xmb_shadows_enable"; + case MENU_ENUM_LABEL_XMB_HIDE_MAIN: + return "xmb_hide_main"; + case MENU_ENUM_LABEL_XMB_HIDE_SETTINGS: + return "xmb_hide_history"; + case MENU_ENUM_LABEL_XMB_HIDE_IMAGES: + return "xmb_hide_images"; + case MENU_ENUM_LABEL_XMB_HIDE_MUSIC: + return "xmb_hide_music"; + case MENU_ENUM_LABEL_XMB_HIDE_VIDEO: + return "xmb_hide_video"; + case MENU_ENUM_LABEL_XMB_HIDE_HISTORY: + return "xmb_hide_settings"; + case MENU_ENUM_LABEL_XMB_HIDE_IMPORT: + return "xmb_hide_import"; case MENU_ENUM_LABEL_XMB_RIBBON_ENABLE: return "xmb_ribbon_enable"; case MENU_ENUM_LABEL_XMB_SCALE_FACTOR: @@ -3713,6 +3727,20 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) return "Menu Color Theme"; case MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE: return "Icon Shadows Enable"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_MAIN: + return "Hide Main Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_SETTINGS: + return "Hide Settings Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMAGES: + return "Hide Images Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_MUSIC: + return "Hide Music Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_VIDEO: + return "Hide Video Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_HISTORY: + return "Hide History Tab"; + case MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMPORT: + return "Hide Import Content Tab"; case MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE: return "Menu Shader Pipeline"; case MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME: diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 2a26fba17e..3954d65ba8 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -113,27 +113,6 @@ enum XMB_TEXTURE_LAST }; -enum -{ - XMB_SYSTEM_TAB_MAIN = 0, - XMB_SYSTEM_TAB_SETTINGS, -#ifdef HAVE_IMAGEVIEWER - XMB_SYSTEM_TAB_IMAGES, -#endif -#ifdef HAVE_FFMPEG - XMB_SYSTEM_TAB_MUSIC, - XMB_SYSTEM_TAB_VIDEO, -#endif - XMB_SYSTEM_TAB_HISTORY, - XMB_SYSTEM_TAB_ADD -}; - -#ifdef HAVE_LIBRETRODB -#define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_ADD -#else -#define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_HISTORY -#endif - typedef struct xmb_handle { file_list_t *menu_stack_old; @@ -251,6 +230,22 @@ typedef struct xmb_handle } passive; } items; + struct + { + unsigned main; + unsigned settings; +#ifdef HAVE_IMAGEVIEWER + unsigned images; +#endif +#ifdef HAVE_FFMPEG + unsigned music; + unsigned video; +#endif + unsigned history; + unsigned import; + unsigned end; + } tabs; + xmb_node_t main_menu_node; #ifdef HAVE_IMAGEVIEWER xmb_node_t images_tab_node; @@ -424,7 +419,7 @@ static size_t xmb_list_get_size(void *data, enum menu_list_type type) return file_list_get_size(xmb->horizontal_list); break; case MENU_LIST_TABS: - return XMB_SYSTEM_TAB_END; + return xmb->tabs.end - 1; } return 0; @@ -982,7 +977,7 @@ static xmb_node_t *xmb_node_allocate_userdata(xmb_handle_t *xmb, unsigned i) node->alpha = xmb->categories.passive.alpha; node->zoom = xmb->categories.passive.zoom; - if ((i + XMB_SYSTEM_TAB_END) == xmb->categories.active.idx) + if ((i + xmb->tabs.end) == xmb->categories.active.idx) { node->alpha = xmb->categories.active.alpha; node->zoom = xmb->categories.active.zoom; @@ -1110,7 +1105,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb, static void xmb_set_title(xmb_handle_t *xmb) { - if (xmb->categories.selection_ptr <= XMB_SYSTEM_TAB_END) + if (xmb->categories.selection_ptr < xmb->tabs.end) { menu_entries_get_title(xmb->title_name, sizeof(xmb->title_name)); } @@ -1119,7 +1114,7 @@ static void xmb_set_title(xmb_handle_t *xmb) const char *path = NULL; menu_entries_get_at_offset( xmb->horizontal_list, - xmb->categories.selection_ptr - (XMB_SYSTEM_TAB_END + 1), + xmb->categories.selection_ptr - xmb->tabs.end, &path, NULL, NULL, NULL, NULL); if (!path) @@ -1131,38 +1126,34 @@ static void xmb_set_title(xmb_handle_t *xmb) static xmb_node_t* xmb_get_node(xmb_handle_t *xmb, unsigned i) { - switch (i) - { - case XMB_SYSTEM_TAB_SETTINGS: - return &xmb->settings_tab_node; + if (i == xmb->tabs.main) //ZSV + return &xmb->main_menu_node; + else if (i == xmb->tabs.settings) + return &xmb->settings_tab_node; #ifdef HAVE_IMAGEVIEWER - case XMB_SYSTEM_TAB_IMAGES: - return &xmb->images_tab_node; + else if (i == xmb->tabs.images) + return &xmb->images_tab_node; #endif #ifdef HAVE_FFMPEG - case XMB_SYSTEM_TAB_VIDEO: - return &xmb->video_tab_node; - case XMB_SYSTEM_TAB_MUSIC: - return &xmb->music_tab_node; + else if (i == xmb->tabs.music) + return &xmb->video_tab_node; + else if (i == xmb->tabs.video) + return &xmb->music_tab_node; #endif - case XMB_SYSTEM_TAB_HISTORY: - return &xmb->history_tab_node; - case XMB_SYSTEM_TAB_ADD: - return &xmb->add_tab_node; - default: - if (i > XMB_SYSTEM_TAB_END) - return xmb_get_userdata_from_horizontal_list( - xmb, i - (XMB_SYSTEM_TAB_END + 1)); - } - - return &xmb->main_menu_node; + else if (i == xmb->tabs.history) + return &xmb->history_tab_node; + else if (i == xmb->tabs.import) + return &xmb->add_tab_node; + else + return xmb_get_userdata_from_horizontal_list( + xmb, i - xmb->tabs.end); } static void xmb_list_switch_horizontal_list(xmb_handle_t *xmb) { unsigned j; size_t list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) - + XMB_SYSTEM_TAB_END; + + xmb->tabs.end; for (j = 0; j <= list_size; j++) { @@ -1242,7 +1233,7 @@ static void xmb_list_open_horizontal_list(xmb_handle_t *xmb) { unsigned j; size_t list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) - + XMB_SYSTEM_TAB_END; + + xmb->tabs.end; for (j = 0; j <= list_size; j++) { @@ -1325,7 +1316,7 @@ static void xmb_toggle_horizontal_list(xmb_handle_t *xmb) { unsigned i; size_t list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) - + XMB_SYSTEM_TAB_END; + + xmb->tabs.end; for (i = 0; i <= list_size; i++) { @@ -1592,22 +1583,15 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, if (core_node) return core_node->content_icon; -#if defined(HAVE_IMAGEVIEWER) || defined(HAVE_FFMPEG) - switch (xmb->categories.selection_ptr) - { #ifdef HAVE_IMAGEVIEWER - case XMB_SYSTEM_TAB_IMAGES: - return xmb->textures.list[XMB_TEXTURE_IMAGE]; + if (xmb->categories.selection_ptr == xmb->tabs.images) + return xmb->textures.list[XMB_TEXTURE_IMAGE]; #endif #ifdef HAVE_FFMPEG - case XMB_SYSTEM_TAB_MUSIC: - return xmb->textures.list[XMB_TEXTURE_MUSIC]; - case XMB_SYSTEM_TAB_VIDEO: - return xmb->textures.list[XMB_TEXTURE_MOVIE]; -#endif - default: - break; - } + if (xmb->categories.selection_ptr == xmb->tabs.music) + return xmb->textures.list[XMB_TEXTURE_MUSIC]; + else if (xmb->categories.selection_ptr == xmb->tabs.video) + return xmb->textures.list[XMB_TEXTURE_MOVIE]; #endif return xmb->textures.list[XMB_TEXTURE_FILE]; case FILE_TYPE_CARCHIVE: @@ -1679,9 +1663,9 @@ static void xmb_draw_items(xmb_handle_t *xmb, if (!list || !list->size) return; - if (cat_selection_ptr > XMB_SYSTEM_TAB_END) + if (cat_selection_ptr >= xmb->tabs.end) core_node = xmb_get_userdata_from_horizontal_list( - xmb, cat_selection_ptr - (XMB_SYSTEM_TAB_END + 1)); + xmb, cat_selection_ptr - xmb->tabs.end); end = file_list_get_size(list); @@ -2213,7 +2197,7 @@ static void xmb_frame(void *data) /* Horizontal tab icons */ for (i = 0; i <= xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) - + XMB_SYSTEM_TAB_END; i++) + + xmb->tabs.end; i++) { xmb_node_t *node = xmb_get_node(xmb, i); @@ -2546,6 +2530,7 @@ static void *xmb_init(void **userdata) unsigned width, height; xmb_handle_t *xmb = NULL; menu_handle_t *menu = (menu_handle_t*)calloc(1, sizeof(*menu)); + settings_t *settings = config_get_ptr(); if (!menu) goto error; @@ -2580,6 +2565,40 @@ static void *xmb_init(void **userdata) xmb->depth = 1; xmb->old_depth = 1; xmb->alpha = 0; + xmb->tabs.main = ~0; + xmb->tabs.settings = ~0; +#ifdef HAVE_IMAGEVIEWER + xmb->tabs.images = ~0; +#endif +#ifdef HAVE_FFMPEG + xmb->tabs.music = ~0; + xmb->tabs.video = ~0; +#endif + xmb->tabs.history = ~0; + xmb->tabs.import = ~0; + xmb->tabs.end = 0; + + if (!settings->menu.xmb.hide_main) //ZSV + xmb->tabs.main = xmb->tabs.end++; + if (!settings->menu.xmb.hide_settings) + xmb->tabs.settings = xmb->tabs.end++; +#ifdef HAVE_IMAGEVIEWER + if (!settings->menu.xmb.hide_images) + xmb->tabs.images = xmb->tabs.end++; +#endif +#ifdef HAVE_FFMPEG + if (!settings->menu.xmb.hide_music) + xmb->tabs.music = xmb->tabs.end++; + if (!settings->menu.xmb.hide_video) + xmb->tabs.video = xmb->tabs.end++; +#endif + if (!settings->menu.xmb.hide_history) + xmb->tabs.history = xmb->tabs.end++; +#ifdef HAVE_LIBRETRODB + if (!settings->menu.xmb.hide_import) + xmb->tabs.import = xmb->tabs.end++; +#endif + menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL); /* TODO/FIXME - we don't use framebuffer at all @@ -3028,7 +3047,7 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action xmb->selection_ptr_old = selection; list_size = xmb_list_get_size(xmb, MENU_LIST_HORIZONTAL) - + XMB_SYSTEM_TAB_END; + + xmb->tabs.end - 1; switch (type) { @@ -3065,60 +3084,65 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action free(menu_stack->list[stack_size - 1].label); menu_stack->list[stack_size - 1].label = NULL; - switch (xmb->categories.selection_ptr) + if (xmb->categories.selection_ptr == xmb->tabs.main) //ZSV { - case XMB_SYSTEM_TAB_MAIN: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)); - menu_stack->list[stack_size - 1].type = - MENU_SETTINGS; - break; - case XMB_SYSTEM_TAB_SETTINGS: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_SETTINGS_TAB; - break; + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)); + menu_stack->list[stack_size - 1].type = + MENU_SETTINGS; + } + else if (xmb->categories.selection_ptr == xmb->tabs.settings) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_SETTINGS_TAB; + } #ifdef HAVE_IMAGEVIEWER - case XMB_SYSTEM_TAB_IMAGES: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_IMAGES_TAB; - break; + else if (xmb->categories.selection_ptr == xmb->tabs.images) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_IMAGES_TAB; + } #endif #ifdef HAVE_FFMPEG - case XMB_SYSTEM_TAB_VIDEO: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_VIDEO_TAB; - break; - case XMB_SYSTEM_TAB_MUSIC: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_MUSIC_TAB; - break; + else if (xmb->categories.selection_ptr == xmb->tabs.music) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_MUSIC_TAB; + } + else if (xmb->categories.selection_ptr == xmb->tabs.video) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_VIDEO_TAB; + } #endif - case XMB_SYSTEM_TAB_HISTORY: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_HISTORY_TAB; - break; - case XMB_SYSTEM_TAB_ADD: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)); - menu_stack->list[stack_size - 1].type = - MENU_ADD_TAB; - break; - default: - menu_stack->list[stack_size - 1].label = - strdup(msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)); - menu_stack->list[stack_size - 1].type = - MENU_SETTING_HORIZONTAL_MENU; - break; + else if (xmb->categories.selection_ptr == xmb->tabs.history) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_HISTORY_TAB; + } + else if (xmb->categories.selection_ptr == xmb->tabs.import) + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_ADD_TAB; + } + else + { + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)); + menu_stack->list[stack_size - 1].type = + MENU_SETTING_HORIZONTAL_MENU; } break; default: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 98222b6bc6..2e201b24ef 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -4647,6 +4647,27 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE, PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_MAIN, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_SETTINGS, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_IMAGES, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_MUSIC, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_VIDEO, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_HISTORY, + PARSE_ONLY_BOOL, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_XMB_HIDE_IMPORT, + PARSE_ONLY_BOOL, false); menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_XMB_RIBBON_ENABLE, PARSE_ONLY_UINT, false); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index bc5493e09c..8cfeeb8504 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -6979,6 +6979,118 @@ static bool setting_append_list( SD_FLAG_NONE); menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE); + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_main, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_MAIN), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_MAIN), + xmb_hide_main, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_MAIN); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_settings, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_SETTINGS), + xmb_hide_settings, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_SETTINGS); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_images, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_IMAGES), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMAGES), + xmb_hide_images, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_IMAGES); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_music, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_MUSIC), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_MUSIC), + xmb_hide_music, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_MUSIC); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_video, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_VIDEO), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_VIDEO), + xmb_hide_video, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_VIDEO); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_history, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_HISTORY), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_HISTORY), + xmb_hide_history, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_HISTORY); + + CONFIG_BOOL( + list, list_info, + &settings->menu.xmb.hide_import, + msg_hash_to_str(MENU_ENUM_LABEL_XMB_HIDE_IMPORT), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMPORT), + xmb_hide_import, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON), + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_XMB_HIDE_IMPORT); + #ifdef HAVE_SHADERPIPELINE CONFIG_UINT( list, list_info, diff --git a/msg_hash.h b/msg_hash.h index 85a709ce63..c49eca7317 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -562,6 +562,13 @@ enum msg_hash_enums MENU_ENUM_LABEL_XMB_THEME, MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME, MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE, + MENU_ENUM_LABEL_XMB_HIDE_MAIN, + MENU_ENUM_LABEL_XMB_HIDE_SETTINGS, + MENU_ENUM_LABEL_XMB_HIDE_IMAGES, + MENU_ENUM_LABEL_XMB_HIDE_MUSIC, + MENU_ENUM_LABEL_XMB_HIDE_VIDEO, + MENU_ENUM_LABEL_XMB_HIDE_HISTORY, + MENU_ENUM_LABEL_XMB_HIDE_IMPORT, MENU_ENUM_LABEL_XMB_RIBBON_ENABLE, MENU_ENUM_LABEL_THUMBNAILS, MENU_ENUM_LABEL_TIMEDATE_ENABLE, @@ -584,6 +591,13 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_XMB_THEME, MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME, MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_MAIN, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_SETTINGS, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMAGES, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_MUSIC, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_VIDEO, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_HISTORY, + MENU_ENUM_LABEL_VALUE_XMB_HIDE_IMPORT, MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, MENU_ENUM_LABEL_VALUE_THUMBNAILS, MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE,