diff --git a/config.def.h b/config.def.h index 72e1974b13..156f5c988a 100644 --- a/config.def.h +++ b/config.def.h @@ -522,6 +522,9 @@ static const bool content_show_netplay = true; static const bool content_show_history = true; static const bool content_show_add = true; static const bool content_show_playlists = true; +#if defined(HAVE_LIBRETRODB) +#define DEFAULT_MENU_CONTENT_SHOW_EXPLORE true +#endif #ifdef HAVE_XMB static const unsigned xmb_alpha_factor = 75; diff --git a/configuration.c b/configuration.c index a64c5c08ef..cb6c80192d 100644 --- a/configuration.c +++ b/configuration.c @@ -1591,6 +1591,9 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("content_show_history", &settings->bools.menu_content_show_history, true, content_show_history, false); SETTING_BOOL("content_show_add", &settings->bools.menu_content_show_add, true, content_show_add, false); SETTING_BOOL("content_show_playlists", &settings->bools.menu_content_show_playlists, true, content_show_playlists, false); +#if defined(HAVE_LIBRETRODB) + SETTING_BOOL("content_show_explore", &settings->bools.menu_content_show_explore, true, DEFAULT_MENU_CONTENT_SHOW_EXPLORE, false); +#endif SETTING_BOOL("menu_show_load_core", &settings->bools.menu_show_load_core, true, menu_show_load_core, false); SETTING_BOOL("menu_show_load_content", &settings->bools.menu_show_load_content, true, menu_show_load_content, false); #ifdef HAVE_CDROM diff --git a/configuration.h b/configuration.h index b96925b03b..8b36ac56c9 100644 --- a/configuration.h +++ b/configuration.h @@ -231,6 +231,7 @@ typedef struct settings bool menu_content_show_history; bool menu_content_show_add; bool menu_content_show_playlists; + bool menu_content_show_explore; bool menu_use_preferred_system_color_theme; bool menu_preferred_system_color_theme_set; bool menu_unified_controls; diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index d0d391a48a..9e3a77cd62 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -696,6 +696,10 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST, "deferred_video_list" ) +MSG_HASH( + MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST, + "deferred_explore_list" + ) MSG_HASH( MENU_ENUM_LABEL_DEFERRED_NETPLAY, "deferred_netplay" @@ -3316,6 +3320,10 @@ MSG_HASH( MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLISTS, "content_show_playlists" ) +MSG_HASH( + MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE, + "content_show_explore" + ) MSG_HASH( MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES, "content_show_favorites" @@ -3626,6 +3634,10 @@ MSG_HASH( MENU_ENUM_LABEL_GOTO_VIDEO, "goto_video" ) +MSG_HASH( + MENU_ENUM_LABEL_GOTO_EXPLORE, + "goto_explore" + ) MSG_HASH( MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, "materialui_icons_enable" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index d1db36f245..ec7c2efae3 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -268,6 +268,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Videos which have been previously played will appear here." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE, + "Explore" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_EXPLORE, + "Browse all content matching the database via a categorized search interface." + ) /* Main Menu > Online Updater */ @@ -3914,6 +3922,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, "Show playlist tabs inside the main menu." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_EXPLORE, + "Show Explore Tab" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SHOW_EXPLORE, + "Show content explorer tab inside the main menu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, "Show Date and Time" diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 48b3a934ac..626674e323 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -669,6 +669,7 @@ GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_playlist_list, PUSH_DEFAULT, DISPLA GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_music_history_list, PUSH_DEFAULT, DISPLAYLIST_MUSIC_HISTORY) GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_image_history_list, PUSH_DEFAULT, DISPLAYLIST_IMAGES_HISTORY) GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_video_history_list, PUSH_DEFAULT, DISPLAYLIST_VIDEO_HISTORY) +GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_explore_list, PUSH_DEFAULT, DISPLAYLIST_EXPLORE) GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_push_dropdown_box_list, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST) GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_push_dropdown_box_list_special, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_SPECIAL) GENERIC_DEFERRED_PUSH_CLEAR_GENERAL(deferred_push_dropdown_box_list_resolution, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_RESOLUTION) @@ -768,6 +769,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, deferred_playlist_list}, {MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST, deferred_image_history_list}, {MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST, deferred_video_history_list}, + {MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST, deferred_explore_list}, {MENU_ENUM_LABEL_DEFERRED_INPUT_SETTINGS_LIST, deferred_push_input_settings_list}, {MENU_ENUM_LABEL_DEFERRED_INPUT_MENU_SETTINGS_LIST, deferred_push_input_menu_settings_list}, {MENU_ENUM_LABEL_DEFERRED_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST, deferred_push_input_haptic_feedback_settings_list}, diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 42436e6d75..f46c9cd978 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -1856,6 +1856,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_type( case 7: /* Run */ case MENU_SETTING_ACTION_DELETE_ENTRY: case MENU_SETTING_ACTION_CORE_DISK_OPTIONS: + case MENU_EXPLORE_TAB: BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label_menu_more); break; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index add6753dc5..13352a9987 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -525,7 +525,16 @@ int generic_action_ok_displaylist_push(const char *path, info_label = msg_hash_to_str( MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST); info.enum_idx = MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST; - dl_type = DISPLAYLIST_GENERIC; + dl_type = DISPLAYLIST_GENERIC; + break; + case ACTION_OK_DL_EXPLORE_LIST: + info.type = type; + info.directory_ptr = idx; + info_path = label; + info_label = msg_hash_to_str( + MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST); + info.enum_idx = MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST; + dl_type = DISPLAYLIST_GENERIC; break; case ACTION_OK_DL_REMAPPINGS_PORT_LIST: info.type = type; @@ -4958,6 +4967,7 @@ DEFAULT_ACTION_OK_FUNC(action_ok_goto_images, ACTION_OK_DL_IMAGES_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_cdrom_info_list, ACTION_OK_DL_CDROM_INFO_DETAIL_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_goto_video, ACTION_OK_DL_VIDEO_LIST) DEFAULT_ACTION_OK_FUNC(action_ok_goto_music, ACTION_OK_DL_MUSIC_LIST) +DEFAULT_ACTION_OK_FUNC(action_ok_goto_explore, ACTION_OK_DL_EXPLORE_LIST) #if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) DEFAULT_ACTION_OK_FUNC(action_ok_shader_preset_save, ACTION_OK_DL_SHADER_PRESET_SAVE) DEFAULT_ACTION_OK_FUNC(action_ok_shader_preset_remove, ACTION_OK_DL_SHADER_PRESET_REMOVE) @@ -6932,6 +6942,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, {MENU_ENUM_LABEL_GOTO_MUSIC, action_ok_goto_music}, {MENU_ENUM_LABEL_GOTO_IMAGES, action_ok_goto_images}, {MENU_ENUM_LABEL_GOTO_VIDEO, action_ok_goto_video}, + {MENU_ENUM_LABEL_GOTO_EXPLORE, action_ok_goto_explore}, {MENU_ENUM_LABEL_BROWSE_START, action_ok_browse_url_start}, {MENU_ENUM_LABEL_FILE_BROWSER_CORE, action_ok_load_core}, {MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION, action_ok_core_deferred_set}, diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index f3b623c169..4ea47e167a 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -579,6 +579,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_goto_favorites, DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_goto_images, MENU_ENUM_SUBLABEL_GOTO_IMAGES) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_goto_music, MENU_ENUM_SUBLABEL_GOTO_MUSIC) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_goto_video, MENU_ENUM_SUBLABEL_GOTO_VIDEO) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_goto_explore, MENU_ENUM_SUBLABEL_GOTO_EXPLORE) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_filebrowser_settings, MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_filebrowser_open_uwp_permissions, MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_UWP_PERMISSIONS) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_filebrowser_open_picker, MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_PICKER) @@ -729,6 +730,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_settings_tab_enable_password, DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_history_tab, MENU_ENUM_SUBLABEL_CONTENT_SHOW_HISTORY) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_import_content_tab, MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD) DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_playlist_tabs, MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS) +DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_explore_tab, MENU_ENUM_SUBLABEL_CONTENT_SHOW_EXPLORE) 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) @@ -1922,6 +1924,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLISTS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_playlist_tabs); break; + case MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_explore_tab); + break; case MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_main_menu_enable_settings); break; @@ -1943,6 +1948,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_GOTO_VIDEO: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_video); break; + case MENU_ENUM_LABEL_GOTO_EXPLORE: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_explore); + break; case MENU_ENUM_LABEL_GOTO_FAVORITES: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_goto_favorites); break; diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index 07878673db..9de060678d 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -196,8 +196,9 @@ static void *ozone_init(void **userdata, bool video_is_threaded) if (settings->bools.menu_content_show_add && !settings->bools.kiosk_mode_enable) ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_ADD; -#ifdef HAVE_LIBRETRODB - ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_EXPLORE; +#if defined(HAVE_LIBRETRODB) + if (settings->bools.menu_content_show_explore) + ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_EXPLORE; #endif menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL); diff --git a/menu/drivers/ozone/ozone_sidebar.h b/menu/drivers/ozone/ozone_sidebar.h index 162239fd17..8ce22eef1c 100644 --- a/menu/drivers/ozone/ozone_sidebar.h +++ b/menu/drivers/ozone/ozone_sidebar.h @@ -39,7 +39,9 @@ enum OZONE_SYSTEM_TAB_NETPLAY, #endif OZONE_SYSTEM_TAB_ADD, +#if defined(HAVE_LIBRETRODB) OZONE_SYSTEM_TAB_EXPLORE, +#endif /* End of this enum - use the last one to determine num of possible tabs */ OZONE_SYSTEM_TAB_LAST diff --git a/menu/drivers/ozone/ozone_texture.c b/menu/drivers/ozone/ozone_texture.c index d7da57fd21..2ff805772d 100644 --- a/menu/drivers/ozone/ozone_texture.c +++ b/menu/drivers/ozone/ozone_texture.c @@ -110,6 +110,8 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIE]; case MENU_ENUM_LABEL_GOTO_MUSIC: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MUSIC]; + case MENU_ENUM_LABEL_GOTO_EXPLORE: + return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RDB]; /* Menu icons */ case MENU_ENUM_LABEL_CONTENT_SETTINGS: @@ -165,7 +167,7 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, case MENU_ENUM_LABEL_SYSTEM_INFORMATION: case MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INFO]; - case MENU_ENUM_LABEL_EXPLORE_TAB: + case MENU_ENUM_LABEL_EXPLORE_TAB: case MENU_ENUM_LABEL_UPDATE_DATABASES: case MENU_ENUM_LABEL_DATABASE_MANAGER_LIST: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RDB]; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index f11f91d581..deb2e7935f 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -249,7 +249,9 @@ enum XMB_SYSTEM_TAB_NETPLAY, #endif XMB_SYSTEM_TAB_ADD, +#if defined(HAVE_LIBRETRODB) XMB_SYSTEM_TAB_EXPLORE, +#endif /* End of this enum - use the last one to determine num of possible tabs */ XMB_SYSTEM_TAB_MAX_LENGTH @@ -340,7 +342,9 @@ typedef struct xmb_handle xmb_node_t history_tab_node; xmb_node_t favorites_tab_node; xmb_node_t add_tab_node; +#if defined(HAVE_LIBRETRODB) xmb_node_t explore_tab_node; +#endif xmb_node_t netplay_tab_node; menu_input_pointer_t pointer; @@ -1866,8 +1870,10 @@ static xmb_node_t* xmb_get_node(xmb_handle_t *xmb, unsigned i) #endif case XMB_SYSTEM_TAB_ADD: return &xmb->add_tab_node; +#if defined(HAVE_LIBRETRODB) case XMB_SYSTEM_TAB_EXPLORE: return &xmb->explore_tab_node; +#endif default: if (i > xmb->system_tab_end) return xmb_get_userdata_from_horizontal_list( @@ -2522,6 +2528,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, return xmb->textures.list[XMB_TEXTURE_MOVIE]; case MENU_ENUM_LABEL_GOTO_MUSIC: return xmb->textures.list[XMB_TEXTURE_MUSIC]; + case MENU_ENUM_LABEL_GOTO_EXPLORE: + return xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; case MENU_ENUM_LABEL_LOAD_DISC: case MENU_ENUM_LABEL_DUMP_DISC: @@ -5450,8 +5458,9 @@ static void *xmb_init(void **userdata, bool video_is_threaded) && !settings->bools.kiosk_mode_enable) xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD; -#ifdef HAVE_LIBRETRODB - xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_EXPLORE; +#if defined(HAVE_LIBRETRODB) + if (settings->bools.menu_content_show_explore) + xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_EXPLORE; #endif menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL); @@ -5936,9 +5945,11 @@ static void xmb_context_reset_textures( xmb->add_tab_node.alpha = xmb->categories_active_alpha; xmb->add_tab_node.zoom = xmb->categories_active_zoom; +#if defined(HAVE_LIBRETRODB) xmb->explore_tab_node.icon = xmb->textures.list[XMB_TEXTURE_MAIN_MENU]; xmb->explore_tab_node.alpha = xmb->categories_active_alpha; xmb->explore_tab_node.zoom = xmb->categories_active_zoom; +#endif #ifdef HAVE_NETWORKING xmb->netplay_tab_node.icon = xmb->textures.list[XMB_TEXTURE_NETPLAY]; @@ -6366,12 +6377,14 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action menu_stack->list[stack_size - 1].type = MENU_ADD_TAB; break; +#if defined(HAVE_LIBRETRODB) case XMB_SYSTEM_TAB_EXPLORE: menu_stack->list[stack_size - 1].label = strdup(msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_TAB)); menu_stack->list[stack_size - 1].type = MENU_EXPLORE_TAB; break; +#endif default: menu_stack->list[stack_size - 1].label = strdup(msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)); diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index d8ef1b022a..89dc2e75c6 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -77,6 +77,7 @@ enum ACTION_OK_DL_FAVORITES_LIST, ACTION_OK_DL_IMAGES_LIST, ACTION_OK_DL_VIDEO_LIST, + ACTION_OK_DL_EXPLORE_LIST, ACTION_OK_DL_MUSIC_LIST, ACTION_OK_DL_SHADER_PARAMETERS, ACTION_OK_DL_SHADER_PRESET, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 35313cfd5e..948d026e64 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3080,13 +3080,14 @@ static unsigned menu_displaylist_parse_playlists( count++; } -#ifdef HAVE_LIBRETRODB - if (menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_EXPLORE_TAB), - msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_TAB), - MENU_ENUM_LABEL_EXPLORE_TAB, - MENU_EXPLORE_TAB, 0, 0)) - count++; +#if defined(HAVE_LIBRETRODB) + if (settings->bools.menu_content_show_explore) + if (menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE), + msg_hash_to_str(MENU_ENUM_LABEL_GOTO_EXPLORE), + MENU_ENUM_LABEL_GOTO_EXPLORE, + MENU_EXPLORE_TAB, 0, 0)) + count++; #endif if (settings->bools.menu_content_show_favorites) if (menu_entries_append_enum(info->list, @@ -4367,7 +4368,7 @@ static bool menu_displaylist_push_internal( if (menu_displaylist_ctl(DISPLAYLIST_SCAN_DIRECTORY_LIST, info)) return true; } -#ifdef HAVE_LIBRETRODB +#if defined(HAVE_LIBRETRODB) else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_TAB))) { if (menu_displaylist_ctl(DISPLAYLIST_EXPLORE, info)) @@ -5453,11 +5454,8 @@ unsigned menu_displaylist_build_list( count = menu_displaylist_parse_system_info(list); break; case DISPLAYLIST_EXPLORE: -#ifdef HAVE_LIBRETRODB - { - unsigned menu_displaylist_explore(file_list_t *list); - count = menu_displaylist_explore(list); - } +#if defined(HAVE_LIBRETRODB) + count = menu_displaylist_explore(list); #endif break; case DISPLAYLIST_SCAN_DIRECTORY_LIST: @@ -5781,6 +5779,15 @@ unsigned menu_displaylist_build_list( MENU_SETTING_ACTION, 0, 0)) count++; +#if defined(HAVE_LIBRETRODB) + if (settings->bools.menu_content_show_explore) + if (menu_entries_append_enum(list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE), + msg_hash_to_str(MENU_ENUM_LABEL_GOTO_EXPLORE), + MENU_ENUM_LABEL_GOTO_EXPLORE, + MENU_EXPLORE_TAB, 0, 0)) + count++; +#endif if (menu_content_show_favorites) if (menu_entries_append_enum(list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES), @@ -7443,6 +7450,7 @@ unsigned menu_displaylist_build_list( {MENU_ENUM_LABEL_MENU_SHOW_SHUTDOWN, PARSE_ONLY_BOOL, true }, {MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS, PARSE_ONLY_BOOL, true }, {MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS_PASSWORD, PARSE_ONLY_STRING, true}, + {MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE, PARSE_ONLY_BOOL, true }, {MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES, PARSE_ONLY_BOOL, true }, {MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES, PARSE_ONLY_BOOL, true }, {MENU_ENUM_LABEL_CONTENT_SHOW_MUSIC, PARSE_ONLY_BOOL, true }, diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 344a7af226..da4b9ee2e5 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -332,6 +332,10 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list); bool menu_displaylist_has_subsystems(void); +#if defined(HAVE_LIBRETRODB) +unsigned menu_displaylist_explore(file_list_t *list); +#endif + enum filebrowser_enums filebrowser_get_type(void); void filebrowser_clear_type(void); diff --git a/menu/menu_driver.h b/menu/menu_driver.h index aa8e92a069..cd82661ce1 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -474,7 +474,9 @@ void menu_display_handle_wallpaper_upload(retro_task_t *task, void *task_data, void *user_data, const char *err); +#if defined(HAVE_LIBRETRODB) void menu_explore_free(void); +#endif menu_handle_t *menu_driver_get_ptr(void); diff --git a/menu/menu_explore.c b/menu/menu_explore.c index 7fcf42ae46..61fe77ea4e 100644 --- a/menu/menu_explore.c +++ b/menu/menu_explore.c @@ -832,7 +832,17 @@ static int explore_action_sublabel_spacer( file_list_t *list, unsigned type, unsigned i, const char *label, const char *path, char *s, size_t len) { - strlcpy(s, " ", len); + const char *menu_driver = menu_driver_ident(); + + /* Only add a blank 'spacer' sublabel when + * using Ozone + * > In XMB/GLUI it upsets the vertical layout + * > In RGUI it does nothing other than + * unnecessarily blank out the fallback + * core title text in the sublabel area */ + if (string_is_equal(menu_driver, "ozone")) + strlcpy(s, " ", len); + return 1; /* 1 means it'll never change and can be cached */ } diff --git a/menu/menu_setting.c b/menu/menu_setting.c index b75d23a320..ec81d5b76e 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -14359,6 +14359,23 @@ static bool setting_append_list( general_read_handler, SD_FLAG_NONE); +#if defined(HAVE_LIBRETRODB) + CONFIG_BOOL( + list, list_info, + &settings->bools.menu_content_show_explore, + MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE, + MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_EXPLORE, + DEFAULT_MENU_CONTENT_SHOW_EXPLORE, + 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_MATERIALUI if (string_is_equal(settings->arrays.menu_driver, "glui")) { diff --git a/msg_hash.h b/msg_hash.h index 32768e4f89..ae6e7e00c0 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1080,6 +1080,7 @@ enum msg_hash_enums MENU_LABEL(CONTENT_SHOW_HISTORY), MENU_LABEL(CONTENT_SHOW_ADD), MENU_LABEL(CONTENT_SHOW_PLAYLISTS), + MENU_LABEL(CONTENT_SHOW_EXPLORE), MENU_LABEL(XMB_RIBBON_ENABLE), MENU_LABEL(THUMBNAILS), MENU_LABEL(THUMBNAILS_RGUI), @@ -1216,6 +1217,7 @@ enum msg_hash_enums MENU_LABEL(GOTO_MUSIC), MENU_LABEL(GOTO_IMAGES), MENU_LABEL(GOTO_VIDEO), + MENU_LABEL(GOTO_EXPLORE), MENU_LABEL(ADD_TO_FAVORITES), MENU_LABEL(ADD_TO_FAVORITES_PLAYLIST), MENU_LABEL(SET_CORE_ASSOCIATION), @@ -1355,6 +1357,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST, MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST, MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST, + MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST, MENU_ENUM_LABEL_DEFERRED_NETPLAY, MENU_ENUM_LABEL_DEFERRED_MUSIC, MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_START, diff --git a/ui/drivers/qt/options/ui.cpp b/ui/drivers/qt/options/ui.cpp index 19da79a658..74b3bb6f2c 100644 --- a/ui/drivers/qt/options/ui.cpp +++ b/ui/drivers/qt/options/ui.cpp @@ -119,7 +119,7 @@ QWidget *ViewsPage::widget() menu_file_list_cbs_t *cbs = (menu_file_list_cbs_t*) file_list_get_actiondata_at_offset(list, i); - if (cbs->enum_idx == (kioskMode ? MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS : MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES)) + if (cbs->enum_idx == (kioskMode ? MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS : MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE)) { tabs_begin = i; break;