From f7e5bb6b915bd0eb1e3b67e22af9233c2c73ab97 Mon Sep 17 00:00:00 2001 From: Kay Soma Edwards Date: Sun, 8 Jun 2025 15:33:27 -0500 Subject: [PATCH 1/2] I've added the playlists within playlists feature that is commonly requested at certain forums. The feature may be tested by creating an entry within an existing playlist having a "core_path" of "virtual", "core_name" of "playlist", and "path" pointed to any existing playlist. The feature works by reusing certain mechanisms, notably the generic RPL and COLLECTION processing, that were already in place. I have though added a FILE_TYPE, MENU_ENUM_LABEL, DISPLAYLIST, and ACTION setup unique to the feature in order to avoid what I considered to be contamination; I wanted to avoid hacks that, while simpler, would have made the feature harder to debug separately from the existing code. --- input/input_driver.c | 1 + intl/msg_hash_lbl.h | 8 ++++++++ menu/cbs/menu_cbs_cancel.c | 5 +++++ menu/cbs/menu_cbs_deferred_push.c | 4 ++++ menu/cbs/menu_cbs_left.c | 1 + menu/cbs/menu_cbs_ok.c | 14 ++++++++++++++ menu/cbs/menu_cbs_right.c | 1 + menu/cbs/menu_cbs_scan.c | 1 + menu/cbs/menu_cbs_title.c | 1 + menu/drivers/materialui.c | 5 ++++- menu/drivers/ozone.c | 21 +++++++++++++++------ menu/drivers/rgui.c | 5 ++++- menu/drivers/xmb.c | 16 ++++++++++++---- menu/menu_cbs.h | 1 + menu/menu_displaylist.c | 12 +++++++++++- menu/menu_displaylist.h | 1 + menu/menu_driver.c | 13 ++++++++++++- msg_hash.h | 3 +++ 18 files changed, 99 insertions(+), 14 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index d88516a0e7..b607604d68 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -7210,6 +7210,7 @@ void input_driver_collect_system_input(input_driver_state_t *input_st, switch (entry.type) { case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case FILE_TYPE_PLAYLIST_ENTRY: case FILE_TYPE_PLAIN: case FILE_TYPE_RDB: diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 0e3b53ea52..71661e6555 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -2952,6 +2952,10 @@ MSG_HASH( MENU_ENUM_LABEL_PLAYLIST_ENTRY, "playlist_entry" ) +MSG_HASH( + MENU_ENUM_LABEL_DESCENDANT_ENTRY, + "descendant_entry" + ) MSG_HASH( MENU_ENUM_LABEL_PLAYLIST_SETTINGS, "playlist_settings" @@ -4958,6 +4962,10 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, "deferred_rpl_entry_actions" ) +MSG_HASH( + MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, + "deferred_descendant_entry_actions" + ) MSG_HASH( MENU_ENUM_LABEL_OVERLAY_SETTINGS, "overlay_settings" diff --git a/menu/cbs/menu_cbs_cancel.c b/menu/cbs/menu_cbs_cancel.c index e73389ae49..5518906ff4 100644 --- a/menu/cbs/menu_cbs_cancel.c +++ b/menu/cbs/menu_cbs_cancel.c @@ -79,6 +79,11 @@ int action_cancel_pop_default(const char *path, filebrowser_clear_type(); } + if (menu_type == DISPLAYLIST_DESCENDANT + && menu_st->driver_ctx + && menu_st->driver_ctx->refresh_thumbnail_image) + menu_st->driver_ctx->refresh_thumbnail_image(menu_st->userdata, menu_st->selection_ptr); + new_selection_ptr = menu_st->selection_ptr; menu_entries_pop_stack(&new_selection_ptr, 0, 1); menu_st->selection_ptr = new_selection_ptr; diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index ba2867f90e..c54c44fb6f 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -250,6 +250,7 @@ GENERIC_DEFERRED_PUSH(deferred_push_accounts_facebook_list, DISPLAYLIST_ GENERIC_DEFERRED_PUSH(deferred_push_help, DISPLAYLIST_HELP_SCREEN_LIST) GENERIC_DEFERRED_PUSH(deferred_push_rdb_entry_detail, DISPLAYLIST_DATABASE_ENTRY) GENERIC_DEFERRED_PUSH(deferred_push_rpl_entry_actions, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS) +GENERIC_DEFERRED_PUSH(deferred_push_descendant_entry_actions, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS) GENERIC_DEFERRED_PUSH(deferred_push_core_list_deferred, DISPLAYLIST_CORES_SUPPORTED) GENERIC_DEFERRED_PUSH(deferred_push_core_collection_list_deferred, DISPLAYLIST_CORES_COLLECTION_SUPPORTED) GENERIC_DEFERRED_PUSH(deferred_push_menu_sounds_list, DISPLAYLIST_MENU_SOUNDS_LIST) @@ -620,6 +621,7 @@ GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_default, PUSH_DEFAULT, DISPLAYLIST_D GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_favorites_list, PUSH_DEFAULT, DISPLAYLIST_FAVORITES) GENERIC_DEFERRED_PUSH_GENERAL(deferred_playlist_list, PUSH_DEFAULT, DISPLAYLIST_PLAYLIST) +GENERIC_DEFERRED_PUSH_GENERAL(deferred_descendant_list, PUSH_DEFAULT, DISPLAYLIST_DESCENDANT) GENERIC_DEFERRED_PUSH_GENERAL(deferred_music_history_list, PUSH_DEFAULT, DISPLAYLIST_MUSIC_HISTORY) GENERIC_DEFERRED_PUSH_GENERAL(deferred_image_history_list, PUSH_DEFAULT, DISPLAYLIST_IMAGES_HISTORY) GENERIC_DEFERRED_PUSH_GENERAL(deferred_video_history_list, PUSH_DEFAULT, DISPLAYLIST_VIDEO_HISTORY) @@ -775,6 +777,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DEFERRED_MUSIC, deferred_music_list}, {MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST, deferred_music_history_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, deferred_playlist_list}, + {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, deferred_descendant_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}, @@ -788,6 +791,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DISC_INFORMATION, deferred_push_disc_information}, {MENU_ENUM_LABEL_SYSTEM_INFORMATION, deferred_push_system_information}, {MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, deferred_push_rpl_entry_actions}, + {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, deferred_push_descendant_entry_actions}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY, deferred_push_netplay_sublist}, {MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST, deferred_push_driver_settings_list}, {MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST, deferred_push_video_settings_list}, diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index cc92325927..a2f201ab74 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -1181,6 +1181,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs, case FILE_TYPE_RDB: case FILE_TYPE_RDB_ENTRY: case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case FILE_TYPE_SHADER: case FILE_TYPE_SHADER_PRESET: case FILE_TYPE_IMAGE: diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index a71416ed09..a3662c4a4a 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1076,6 +1076,16 @@ int generic_action_ok_displaylist_push( menu->rpl_entry_selection_ptr = (unsigned)entry_idx; dl_type = DISPLAYLIST_GENERIC; break; + case ACTION_OK_DL_DESCENDANT_ENTRY: + fill_pathname_expand_special(menu->deferred_path, label, sizeof(menu->deferred_path)); + info_label = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS); + info_path = menu->deferred_path; + info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS; + info.directory_ptr = idx; + menu->rpl_entry_selection_ptr = (unsigned)entry_idx; + dl_type = DISPLAYLIST_GENERIC; + info.type = DISPLAYLIST_DESCENDANT; + break; case ACTION_OK_DL_AUDIO_DSP_PLUGIN: filebrowser_clear_type(); info.directory_ptr = idx; @@ -6549,6 +6559,7 @@ STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_overlay_preset, ACTION_OK_DL_OVERLAY_PRE STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_osk_overlay_preset, ACTION_OK_DL_OSK_OVERLAY_PRESET) STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_video_font, ACTION_OK_DL_VIDEO_FONT) STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_rpl_entry, ACTION_OK_DL_RPL_ENTRY) +STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_descendant_entry, ACTION_OK_DL_DESCENDANT_ENTRY) STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_open_archive, ACTION_OK_DL_OPEN_ARCHIVE) STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_open_archive_detect_core, ACTION_OK_DL_OPEN_ARCHIVE_DETECT_CORE) STATIC_DEFAULT_ACTION_OK_FUNC(action_ok_file_load_music, ACTION_OK_DL_MUSIC) @@ -9597,6 +9608,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs, case FILE_TYPE_RPL_ENTRY: BIND_ACTION_OK(cbs, action_ok_rpl_entry); break; + case FILE_TYPE_DESCENDANT_ENTRY: + BIND_ACTION_OK(cbs, action_ok_descendant_entry); + break; case FILE_TYPE_PLAYLIST_COLLECTION: BIND_ACTION_OK(cbs, action_ok_playlist_collection); break; diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index e00f651e2c..2da6ef00c9 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -1035,6 +1035,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs, case FILE_TYPE_RDB: case FILE_TYPE_RDB_ENTRY: case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case FILE_TYPE_SHADER: case FILE_TYPE_SHADER_PRESET: case FILE_TYPE_IMAGE: diff --git a/menu/cbs/menu_cbs_scan.c b/menu/cbs/menu_cbs_scan.c index 652bf55e5c..fb12defd9f 100644 --- a/menu/cbs/menu_cbs_scan.c +++ b/menu/cbs/menu_cbs_scan.c @@ -258,6 +258,7 @@ static int menu_cbs_init_bind_scan_compare_type(menu_file_list_cbs_t *cbs, return 0; #endif case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: BIND_ACTION_SCAN(cbs, action_switch_thumbnail); return 0; diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index f46e68976f..01fb655668 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -1850,6 +1850,7 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs, {MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_NETPLAY_MITM_SERVER, action_get_title_dropdown_item}, #endif {MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, action_get_quick_menu_views_settings_list}, + {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, action_get_quick_menu_views_settings_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, action_get_title_deferred_playlist_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_SETTINGS, action_get_title_deferred_playlist_list}, {MENU_ENUM_LABEL_PLAYLISTS_TAB, action_get_title_collection}, diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index ba155af902..fec4298ca2 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -9506,6 +9506,7 @@ static void materialui_populate_entries(void *data, const char *path, | MUI_FLAG_IS_DROPDOWN_LIST); if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) @@ -9587,7 +9588,8 @@ static void materialui_populate_entries(void *data, const char *path, if ( (list) && (list_size > 0) - && (list->list[0].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[0].type == FILE_TYPE_RPL_ENTRY) + || (list->list[0].type == FILE_TYPE_DESCENDANT_ENTRY))) mui->playlist = playlist_get_cached(); } @@ -11508,6 +11510,7 @@ static void materialui_list_insert(void *userdata, node->icon_type = MUI_ICON_TYPE_NONE; break; case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case MENU_SETTING_DROPDOWN_ITEM: case MENU_SETTING_DROPDOWN_ITEM_RESOLUTION: case MENU_SETTING_DROPDOWN_ITEM_VIDEO_SHADER_PARAM: diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 99beeea8ee..f6c0b45e9e 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -2311,6 +2311,7 @@ static uintptr_t ozone_entries_icon_get_texture( case FILE_TYPE_IN_CARCHIVE: return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FILE]; case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case FILE_TYPE_PLAYLIST_COLLECTION: switch (ozone->tabs[ozone->categories_selection_ptr]) { @@ -3726,7 +3727,8 @@ static bool ozone_is_main_menu_playlist(void *userdata) MENU_ENTRY_INITIALIZE(entry); menu_entry_get(&entry, 0, 0, NULL, true); - return entry.type == FILE_TYPE_RPL_ENTRY; + return (entry.type == FILE_TYPE_RPL_ENTRY) + || (entry.type == FILE_TYPE_DESCENDANT_ENTRY); } static void ozone_update_savestate_thumbnail_path(void *data, unsigned i) @@ -4232,7 +4234,8 @@ static void ozone_update_content_metadata(ozone_handle_t *ozone) * to the selected entry */ else if (list && (selection < list_size) - && (list->list[selection].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[selection].type == FILE_TYPE_RPL_ENTRY) + || (list->list[selection].type == FILE_TYPE_DESCENDANT_ENTRY))) { playlist_index = list->list[selection].entry_idx; @@ -5961,7 +5964,8 @@ border_iterate: if (texture) { /* Console specific icons */ - if ( entry.type == FILE_TYPE_RPL_ENTRY + if ( ((entry.type == FILE_TYPE_RPL_ENTRY) + || (entry.type == FILE_TYPE_DESCENDANT_ENTRY)) && ozone->categories_selection_ptr > ozone->system_tab_end) { ozone_node_t *sidebar_node = (ozone_node_t*) @@ -6035,7 +6039,8 @@ border_iterate: } } /* History/Favorite console specific content icons */ - else if ( entry.type == FILE_TYPE_RPL_ENTRY + else if ( ((entry.type == FILE_TYPE_RPL_ENTRY) + || (entry.type == FILE_TYPE_DESCENDANT_ENTRY)) && show_history_icons != PLAYLIST_SHOW_HISTORY_ICONS_DEFAULT) { switch (ozone->tabs[ozone->categories_selection_ptr]) @@ -7738,7 +7743,8 @@ static void ozone_set_thumbnail_content(void *data, const char *s) * to the selected entry */ if ( list && (selection < list_size) - && (list->list[selection].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[selection].type == FILE_TYPE_RPL_ENTRY) + || (list->list[selection].type == FILE_TYPE_DESCENDANT_ENTRY))) { selection = list->list[selection].entry_idx; pl = playlist_get_cached(); @@ -8016,6 +8022,7 @@ static bool ozone_manage_available(ozone_handle_t *ozone, size_t current_selecti { case FILE_TYPE_PLAYLIST_COLLECTION: case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: return true; default: break; @@ -12345,7 +12352,8 @@ static void ozone_populate_entries( if (!list || (list->size < 1)) goto_sidebar = true; - else if ((list->list[0].type != FILE_TYPE_RPL_ENTRY)) + else if ((list->list[0].type != FILE_TYPE_RPL_ENTRY) + || (list->list[0].type != FILE_TYPE_DESCENDANT_ENTRY)) goto_sidebar = true; if (goto_sidebar) @@ -12405,6 +12413,7 @@ static void ozone_populate_entries( ozone->flags &= ~OZONE_FLAG_IS_FILE_LIST; if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST))) ozone->flags2 |= OZONE_FLAG2_IS_QUICK_MENU; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 6baed8e21f..127a9a3e0c 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -7026,7 +7026,8 @@ static void rgui_scan_selected_entry_thumbnail(rgui_t *rgui, bool force_load) * to the selected entry */ if ( (list) && (selection < list_size) - && (list->list[selection].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[selection].type == FILE_TYPE_RPL_ENTRY) + || (list->list[selection].type == FILE_TYPE_DESCENDANT_ENTRY))) { playlist_valid = true; playlist_index = list->list[selection].entry_idx; @@ -7384,6 +7385,7 @@ static void rgui_populate_entries( /* Check whether we are currently viewing a playlist */ if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) @@ -7401,6 +7403,7 @@ static void rgui_populate_entries( /* Determine whether this is the quick menu */ if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST))) rgui->flags |= RGUI_FLAG_IS_QUICK_MENU; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 6376e05af2..eace778354 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1473,7 +1473,8 @@ static void xmb_set_thumbnail_content(void *data, const char *s) * to the selected entry */ if ( list && (selection < list_size) - && (list->list[selection].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[selection].type == FILE_TYPE_RPL_ENTRY) + || (list->list[selection].type == FILE_TYPE_DESCENDANT_ENTRY))) { playlist_valid = true; playlist_index = list->list[selection].entry_idx; @@ -1722,7 +1723,8 @@ static void xmb_set_dynamic_icon_content( * to the selected entry */ if ( list && (selection < list_size) - && (list->list[selection].type == FILE_TYPE_RPL_ENTRY)) + && ((list->list[selection].type == FILE_TYPE_RPL_ENTRY) + || (list->list[selection].type == FILE_TYPE_DESCENDANT_ENTRY))) { playlist_valid = true; playlist_index = list->list[selection].entry_idx; @@ -3101,7 +3103,8 @@ static void xmb_populate_entries(void *data, || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST)); + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)); xmb->is_playlist |= (xmb_horizontal_type == FILE_TYPE_PLAYLIST_COLLECTION) @@ -3152,6 +3155,8 @@ static void xmb_populate_entries(void *data, xmb->is_quick_menu = string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) + || string_is_equal(label, + msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, @@ -3837,6 +3842,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, case FILE_TYPE_IN_CARCHIVE: return xmb->textures.list[XMB_TEXTURE_FILE]; case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: case FILE_TYPE_PLAYLIST_COLLECTION: if (core_node) return core_node->content_icon; @@ -3857,6 +3863,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, switch (type) { case FILE_TYPE_RPL_ENTRY: + case FILE_TYPE_DESCENDANT_ENTRY: return db_node->content_icon; case FILE_TYPE_PLAYLIST_COLLECTION: return db_node->icon; @@ -5248,7 +5255,8 @@ static int xmb_draw_item( texture = sidebar_node->icon; } /* History/Favorite console specific content icons */ - else if (entry_type == FILE_TYPE_RPL_ENTRY + else if (((entry_type == FILE_TYPE_RPL_ENTRY) + || (entry_type == FILE_TYPE_DESCENDANT_ENTRY)) && show_history_icons != PLAYLIST_SHOW_HISTORY_ICONS_DEFAULT) { switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr)) diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index da1e19aad1..1fd70abf26 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -74,6 +74,7 @@ enum ACTION_OK_DL_MANUAL_SCAN_DIR_LIST, ACTION_OK_DL_HELP, ACTION_OK_DL_RPL_ENTRY, + ACTION_OK_DL_DESCENDANT_ENTRY, ACTION_OK_DL_RDB_ENTRY, ACTION_OK_DL_RDB_ENTRY_SUBMENU, ACTION_OK_DL_CDROM_INFO_LIST, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 95415069d9..ca0574573e 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2434,6 +2434,8 @@ static int menu_displaylist_parse_playlist( bool pl_show_sublabels = settings->bools.playlist_show_sublabels; void (*sanitization)(char*) = NULL; unsigned count = 0; + enum msg_file_type type_target = FILE_TYPE_RPL_ENTRY; + enum msg_hash_enums enum_idx = MENU_ENUM_LABEL_PLAYLIST_ENTRY; if (list_size == 0) return 0; @@ -2598,10 +2600,17 @@ static int menu_displaylist_parse_playlist( } } + if (entry && string_is_equal(entry->core_path, "virtual") + && string_is_equal(entry->core_name, "playlist")) + { + type_target = FILE_TYPE_DESCENDANT_ENTRY; + enum_idx = MENU_ENUM_LABEL_DESCENDANT_ENTRY; + } + /* Add menu entry */ if (entry_valid && menu_entries_append(info_list, menu_entry_lbl, entry_path, - MENU_ENUM_LABEL_PLAYLIST_ENTRY, FILE_TYPE_RPL_ENTRY, 0, i, NULL)) + enum_idx, type_target, 0, i, NULL)) count++; } @@ -15607,6 +15616,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, use_filebrowser = true; break; case DISPLAYLIST_PLAYLIST: + case DISPLAYLIST_DESCENDANT: { const char *_msg = path_basename_nocompression(info->path); menu_entries_clear(info->list); diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 5be81f0442..3d32b3444b 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -101,6 +101,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_CONTENTLESS_CORES, DISPLAYLIST_FAVORITES, DISPLAYLIST_PLAYLIST, + DISPLAYLIST_DESCENDANT, DISPLAYLIST_VIDEO_HISTORY, DISPLAYLIST_MUSIC_HISTORY, DISPLAYLIST_IMAGES_HISTORY, diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 716d5e5cde..0e2f557296 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1062,7 +1062,8 @@ size_t menu_entries_get_title(char *s, size_t len) const char *label = (list->size) ? list->list[list->size - 1].label : NULL; /* Show playlist entry instead of "Quick Menu" */ - if (string_is_equal(label, "deferred_rpl_entry_actions")) + if (string_is_equal(label, "deferred_rpl_entry_actions") + || string_is_equal(label, "deferred_descendant_entry_actions")) { playlist_t *playlist = playlist_get_cached(); if (playlist) @@ -7909,6 +7910,16 @@ int generic_menu_entry_action( flush_target = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS); break; } + else if ( string_is_equal(parent_label, + msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) + && (!string_is_empty(deferred_path) + && !string_is_empty(content_path) + && string_is_equal(deferred_path, content_path)) + ) + { + flush_target = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS); + break; + } /* If core was launched via 'Contentless Cores' menu, * flush to 'Contentless Cores' menu */ else if ( string_is_equal(parent_label, diff --git a/msg_hash.h b/msg_hash.h index db7e766ade..7d0ba3e4d3 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -82,6 +82,7 @@ enum msg_file_type FILE_TYPE_RDB, FILE_TYPE_RDB_ENTRY, FILE_TYPE_RPL_ENTRY, + FILE_TYPE_DESCENDANT_ENTRY, FILE_TYPE_BOOL_ON, FILE_TYPE_BOOL_OFF, FILE_TYPE_RECORD_CONFIG, @@ -868,6 +869,7 @@ enum msg_hash_enums #endif MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY, MENU_ENUM_LABEL_PLAYLIST_ENTRY, + MENU_ENUM_LABEL_DESCENDANT_ENTRY, MENU_LABEL(START_VIDEO_PROCESSOR), MENU_LABEL(START_NET_RETROPAD), @@ -2034,6 +2036,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS, MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL, MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, + MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, MENU_ENUM_LABEL_DEFERRED_CORE_LIST, MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST, MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_LIST, From c3c1dfe827b401bbdcbae69617026e90035dc6ab Mon Sep 17 00:00:00 2001 From: Zero Soma Valintine Date: Tue, 10 Jun 2025 05:15:17 -0500 Subject: [PATCH 2/2] I've hopefully completed the nested playlists feature with this version. I am, however, open to any constructive feedback. I fixed a display bug related to thumbnails and titles in this version; the titles were showing the wrong information thanks to the nested playlists being treated as a `Quick Menu` at the wrong time; the thumbnails did not display correctly in all cases thanks to differences between menu drivers. The functionality is identical to the original patch, but the names of certain identifiers have changed to better reflect the standard set by upstream code. The feature has been kept, mostly, small and isolated by simply reusing existing code in a slightly different way than it is currently used. A note about the feature request: the often requested feature has obvious utility for people who create custom playlists; the feature could also be used to generate flat playlists or nested playlists depending on a flag in scanning; the optional nested playlists could be generated from information contained within the databases allowing games for a given system to be broken up by, for example, country of origin. A note about the different menu drivers: an update from a few weeks back broke part of my original private version; that update, related to thumbnail cycling and the then new random selection feature, changed when thumbnails are displayed for certain core types; this patch partially reverts that change to prepare for a future additional feature I've begun working on which would allow people to use RetroArch as more of a general media player with thumbnail generation using the, often internal, `ffmpeg` core; the history and favorites menu should at least offer the opportunity to display thumbnails, in any event, for custom playlists which can have thumbnails for any media type. I've included a sample playlist trunk below; the core's path and name are important and fixed, but the path to the playlist may be set as desired. { "version": "1.5", "default_core_path": "", "default_core_name": "", "label_display_mode": 0, "right_thumbnail_mode": 0, "left_thumbnail_mode": 0, "thumbnail_match_mode": 0, "sort_mode": 0, "items": [ { "path": "/home/username/temporary/branch.lpl", "label": "Branch", "core_path": "virtual", "core_name": "playlist", "crc32": "", "db_name": "Trunk.lpl" } ] } --- intl/msg_hash_lbl.h | 4 ---- menu/cbs/menu_cbs_cancel.c | 2 +- menu/cbs/menu_cbs_deferred_push.c | 6 ++---- menu/cbs/menu_cbs_ok.c | 8 ++++---- menu/cbs/menu_cbs_title.c | 3 ++- menu/drivers/materialui.c | 2 +- menu/drivers/ozone.c | 34 ++++++++++++++++--------------- menu/drivers/rgui.c | 3 +-- menu/drivers/xmb.c | 7 +++---- menu/menu_displaylist.c | 3 ++- menu/menu_displaylist.h | 1 + menu/menu_driver.c | 8 ++++---- msg_hash.h | 1 - 13 files changed, 39 insertions(+), 43 deletions(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 71661e6555..05ef93aee0 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -4962,10 +4962,6 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, "deferred_rpl_entry_actions" ) -MSG_HASH( - MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, - "deferred_descendant_entry_actions" - ) MSG_HASH( MENU_ENUM_LABEL_OVERLAY_SETTINGS, "overlay_settings" diff --git a/menu/cbs/menu_cbs_cancel.c b/menu/cbs/menu_cbs_cancel.c index 5518906ff4..91ab82e4a1 100644 --- a/menu/cbs/menu_cbs_cancel.c +++ b/menu/cbs/menu_cbs_cancel.c @@ -79,7 +79,7 @@ int action_cancel_pop_default(const char *path, filebrowser_clear_type(); } - if (menu_type == DISPLAYLIST_DESCENDANT + if (menu_type == FILE_TYPE_DESCENDANT_ENTRY && menu_st->driver_ctx && menu_st->driver_ctx->refresh_thumbnail_image) menu_st->driver_ctx->refresh_thumbnail_image(menu_st->userdata, menu_st->selection_ptr); diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index c54c44fb6f..ae09668582 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -250,7 +250,6 @@ GENERIC_DEFERRED_PUSH(deferred_push_accounts_facebook_list, DISPLAYLIST_ GENERIC_DEFERRED_PUSH(deferred_push_help, DISPLAYLIST_HELP_SCREEN_LIST) GENERIC_DEFERRED_PUSH(deferred_push_rdb_entry_detail, DISPLAYLIST_DATABASE_ENTRY) GENERIC_DEFERRED_PUSH(deferred_push_rpl_entry_actions, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS) -GENERIC_DEFERRED_PUSH(deferred_push_descendant_entry_actions, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS) GENERIC_DEFERRED_PUSH(deferred_push_core_list_deferred, DISPLAYLIST_CORES_SUPPORTED) GENERIC_DEFERRED_PUSH(deferred_push_core_collection_list_deferred, DISPLAYLIST_CORES_COLLECTION_SUPPORTED) GENERIC_DEFERRED_PUSH(deferred_push_menu_sounds_list, DISPLAYLIST_MENU_SOUNDS_LIST) @@ -621,7 +620,7 @@ GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_default, PUSH_DEFAULT, DISPLAYLIST_D GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_favorites_list, PUSH_DEFAULT, DISPLAYLIST_FAVORITES) GENERIC_DEFERRED_PUSH_GENERAL(deferred_playlist_list, PUSH_DEFAULT, DISPLAYLIST_PLAYLIST) -GENERIC_DEFERRED_PUSH_GENERAL(deferred_descendant_list, PUSH_DEFAULT, DISPLAYLIST_DESCENDANT) +GENERIC_DEFERRED_PUSH_GENERAL(deferred_descendant_list, PUSH_DEFAULT, DISPLAYLIST_DESCENDANT_LIST) GENERIC_DEFERRED_PUSH_GENERAL(deferred_music_history_list, PUSH_DEFAULT, DISPLAYLIST_MUSIC_HISTORY) GENERIC_DEFERRED_PUSH_GENERAL(deferred_image_history_list, PUSH_DEFAULT, DISPLAYLIST_IMAGES_HISTORY) GENERIC_DEFERRED_PUSH_GENERAL(deferred_video_history_list, PUSH_DEFAULT, DISPLAYLIST_VIDEO_HISTORY) @@ -777,7 +776,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DEFERRED_MUSIC, deferred_music_list}, {MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST, deferred_music_history_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, deferred_playlist_list}, - {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, deferred_descendant_list}, + {MENU_ENUM_LABEL_DESCENDANT_ENTRY, deferred_descendant_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}, @@ -791,7 +790,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label( {MENU_ENUM_LABEL_DISC_INFORMATION, deferred_push_disc_information}, {MENU_ENUM_LABEL_SYSTEM_INFORMATION, deferred_push_system_information}, {MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, deferred_push_rpl_entry_actions}, - {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, deferred_push_descendant_entry_actions}, {MENU_ENUM_LABEL_DEFERRED_NETPLAY, deferred_push_netplay_sublist}, {MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST, deferred_push_driver_settings_list}, {MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST, deferred_push_video_settings_list}, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index a3662c4a4a..61bbbfffc2 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1078,13 +1078,13 @@ int generic_action_ok_displaylist_push( break; case ACTION_OK_DL_DESCENDANT_ENTRY: fill_pathname_expand_special(menu->deferred_path, label, sizeof(menu->deferred_path)); - info_label = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS); + info_label = msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY); info_path = menu->deferred_path; - info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS; + info.enum_idx = MENU_ENUM_LABEL_DESCENDANT_ENTRY; info.directory_ptr = idx; menu->rpl_entry_selection_ptr = (unsigned)entry_idx; - dl_type = DISPLAYLIST_GENERIC; - info.type = DISPLAYLIST_DESCENDANT; + dl_type = DISPLAYLIST_DESCENDANT; + info.type = type; break; case ACTION_OK_DL_AUDIO_DSP_PLUGIN: filebrowser_clear_type(); diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 01fb655668..be3b1abb53 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -1850,7 +1850,7 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs, {MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_NETPLAY_MITM_SERVER, action_get_title_dropdown_item}, #endif {MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, action_get_quick_menu_views_settings_list}, - {MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, action_get_quick_menu_views_settings_list}, + {MENU_ENUM_LABEL_DESCENDANT_ENTRY, action_get_title_deferred_playlist_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, action_get_title_deferred_playlist_list}, {MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_SETTINGS, action_get_title_deferred_playlist_list}, {MENU_ENUM_LABEL_PLAYLISTS_TAB, action_get_title_collection}, @@ -1864,6 +1864,7 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs, if (cbs->enum_idx != MENU_ENUM_LABEL_PLAYLIST_ENTRY && cbs->enum_idx != MENU_ENUM_LABEL_EXPLORE_ITEM && + cbs->enum_idx != MENU_ENUM_LABEL_DESCENDANT_ENTRY && menu_cbs_init_bind_title_compare_label(cbs, label) == 0) return 0; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index fec4298ca2..288e5258ad 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -9506,7 +9506,7 @@ static void materialui_populate_entries(void *data, const char *path, | MUI_FLAG_IS_DROPDOWN_LIST); if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index f6c0b45e9e..2076c86979 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -3719,16 +3719,20 @@ static bool ozone_is_main_menu_playlist(void *userdata) { ozone_handle_t *ozone = (ozone_handle_t*)userdata; menu_entry_t entry; + MENU_ENTRY_INITIALIZE(entry); + menu_entry_get(&entry, 0, 0, NULL, true); + + if (entry.type == FILE_TYPE_DESCENDANT_ENTRY) + return true; + + if ( (ozone->depth != 3) || (ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) || (ozone->flags & OZONE_FLAG_IS_FILE_LIST)) return false; - MENU_ENTRY_INITIALIZE(entry); - menu_entry_get(&entry, 0, 0, NULL, true); - return (entry.type == FILE_TYPE_RPL_ENTRY) - || (entry.type == FILE_TYPE_DESCENDANT_ENTRY); + return entry.type == FILE_TYPE_RPL_ENTRY; } static void ozone_update_savestate_thumbnail_path(void *data, unsigned i) @@ -4168,7 +4172,7 @@ static void ozone_update_content_metadata(ozone_handle_t *ozone) if (!string_is_empty(menu_st->thumbnail_path_data->content_core_name)) { - if ( string_is_equal( + if ( (string_is_equal( menu_st->thumbnail_path_data->content_core_name, "imageviewer") || string_is_equal( @@ -4177,6 +4181,8 @@ static void ozone_update_content_metadata(ozone_handle_t *ozone) || string_is_equal( menu_st->thumbnail_path_data->content_core_name, "movieplayer")) + && (( !(ozone->flags & OZONE_FLAG_IS_PLAYLIST)) + && ( !(ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU)))) ozone->flags2 |= OZONE_FLAG2_SELECTION_CORE_IS_VIEWER; else ozone->flags2 &= ~OZONE_FLAG2_SELECTION_CORE_IS_VIEWER; @@ -5964,8 +5970,7 @@ border_iterate: if (texture) { /* Console specific icons */ - if ( ((entry.type == FILE_TYPE_RPL_ENTRY) - || (entry.type == FILE_TYPE_DESCENDANT_ENTRY)) + if ( (entry.type == FILE_TYPE_RPL_ENTRY) && ozone->categories_selection_ptr > ozone->system_tab_end) { ozone_node_t *sidebar_node = (ozone_node_t*) @@ -6039,8 +6044,7 @@ border_iterate: } } /* History/Favorite console specific content icons */ - else if ( ((entry.type == FILE_TYPE_RPL_ENTRY) - || (entry.type == FILE_TYPE_DESCENDANT_ENTRY)) + else if ( (entry.type == FILE_TYPE_RPL_ENTRY) && show_history_icons != PLAYLIST_SHOW_HISTORY_ICONS_DEFAULT) { switch (ozone->tabs[ozone->categories_selection_ptr]) @@ -11695,8 +11699,7 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation) bool update_thumbnails = false; /* Playlist updates */ - if ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST) - && (ozone->depth == 1 || ozone->depth == 3)) + if (ozone->flags & OZONE_FLAG_IS_PLAYLIST) { ozone_set_thumbnail_content(ozone, ""); update_thumbnails = true; @@ -12352,8 +12355,7 @@ static void ozone_populate_entries( if (!list || (list->size < 1)) goto_sidebar = true; - else if ((list->list[0].type != FILE_TYPE_RPL_ENTRY) - || (list->list[0].type != FILE_TYPE_DESCENDANT_ENTRY)) + else if (list->list[0].type != FILE_TYPE_RPL_ENTRY) goto_sidebar = true; if (goto_sidebar) @@ -12413,7 +12415,6 @@ static void ozone_populate_entries( ozone->flags &= ~OZONE_FLAG_IS_FILE_LIST; if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST))) ozone->flags2 |= OZONE_FLAG2_IS_QUICK_MENU; @@ -12431,7 +12432,8 @@ static void ozone_populate_entries( else ozone->flags &= ~OZONE_FLAG_IS_STATE_SLOT; - if (ozone_is_playlist(ozone, true)) + if (ozone_is_playlist(ozone, true) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY))) ozone->flags |= OZONE_FLAG_IS_PLAYLIST; else ozone->flags &= ~OZONE_FLAG_IS_PLAYLIST; @@ -12571,7 +12573,7 @@ static void ozone_populate_entries( * and savestate slots */ if ( ( (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR)) - && ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 3)) + && ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST)) || ((ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) && (ozone->depth >= 4)) || (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST) || (ozone->flags & OZONE_FLAG_IS_FILE_LIST) diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 127a9a3e0c..f81ba77064 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -7385,7 +7385,7 @@ static void rgui_populate_entries( /* Check whether we are currently viewing a playlist */ if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) @@ -7403,7 +7403,6 @@ static void rgui_populate_entries( /* Determine whether this is the quick menu */ if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST))) rgui->flags |= RGUI_FLAG_IS_QUICK_MENU; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index eace778354..dba78932eb 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3104,7 +3104,7 @@ static void xmb_populate_entries(void *data, || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)); + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY)); xmb->is_playlist |= (xmb_horizontal_type == FILE_TYPE_PLAYLIST_COLLECTION) @@ -3156,7 +3156,7 @@ static void xmb_populate_entries(void *data, string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS)) || string_is_equal(label, - msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) + msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_SETTINGS)) || string_is_equal(label, @@ -5255,8 +5255,7 @@ static int xmb_draw_item( texture = sidebar_node->icon; } /* History/Favorite console specific content icons */ - else if (((entry_type == FILE_TYPE_RPL_ENTRY) - || (entry_type == FILE_TYPE_DESCENDANT_ENTRY)) + else if ((entry_type == FILE_TYPE_RPL_ENTRY) && show_history_icons != PLAYLIST_SHOW_HISTORY_ICONS_DEFAULT) { switch (xmb_get_system_tab(xmb, (unsigned)xmb->categories_selection_ptr)) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index ca0574573e..f00d02b685 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -15438,6 +15438,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, case DISPLAYLIST_FILE_BROWSER_SELECT_CORE: case DISPLAYLIST_FILE_BROWSER_SELECT_COLLECTION: case DISPLAYLIST_GENERIC: + case DISPLAYLIST_DESCENDANT: info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR; /* fall-through */ case DISPLAYLIST_PENDING_CLEAR: @@ -15616,7 +15617,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, use_filebrowser = true; break; case DISPLAYLIST_PLAYLIST: - case DISPLAYLIST_DESCENDANT: + case DISPLAYLIST_DESCENDANT_LIST: { const char *_msg = path_basename_nocompression(info->path); menu_entries_clear(info->list); diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 3d32b3444b..5dca644106 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -102,6 +102,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_FAVORITES, DISPLAYLIST_PLAYLIST, DISPLAYLIST_DESCENDANT, + DISPLAYLIST_DESCENDANT_LIST, DISPLAYLIST_VIDEO_HISTORY, DISPLAYLIST_MUSIC_HISTORY, DISPLAYLIST_IMAGES_HISTORY, diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 0e2f557296..51ecb30f87 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1062,8 +1062,7 @@ size_t menu_entries_get_title(char *s, size_t len) const char *label = (list->size) ? list->list[list->size - 1].label : NULL; /* Show playlist entry instead of "Quick Menu" */ - if (string_is_equal(label, "deferred_rpl_entry_actions") - || string_is_equal(label, "deferred_descendant_entry_actions")) + if (string_is_equal(label, "deferred_rpl_entry_actions")) { playlist_t *playlist = playlist_get_cached(); if (playlist) @@ -3331,6 +3330,7 @@ bool menu_driver_search_filter_enabled(const char *label, unsigned type) || (type == MENU_IMAGES_TAB) || (type == MENU_MUSIC_TAB) || (type == MENU_VIDEO_TAB) + || (type == FILE_TYPE_DESCENDANT_ENTRY) || (type == FILE_TYPE_PLAYLIST_COLLECTION); if (!filter_enabled && !string_is_empty(label)) @@ -7911,13 +7911,13 @@ int generic_menu_entry_action( break; } else if ( string_is_equal(parent_label, - msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS)) + msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY)) && (!string_is_empty(deferred_path) && !string_is_empty(content_path) && string_is_equal(deferred_path, content_path)) ) { - flush_target = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS); + flush_target = msg_hash_to_str(MENU_ENUM_LABEL_DESCENDANT_ENTRY); break; } /* If core was launched via 'Contentless Cores' menu, diff --git a/msg_hash.h b/msg_hash.h index 7d0ba3e4d3..1013a1e599 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2036,7 +2036,6 @@ enum msg_hash_enums MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS, MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL, MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, - MENU_ENUM_LABEL_DEFERRED_DESCENDANT_ENTRY_ACTIONS, MENU_ENUM_LABEL_DEFERRED_CORE_LIST, MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST, MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_LIST,