From ffa2f9e712372c1cacfa84c5907d7491c381f0e6 Mon Sep 17 00:00:00 2001 From: sonninnos Date: Thu, 26 Sep 2024 14:39:17 +0300 Subject: [PATCH] Fix playlist search index in XMB+Ozone --- menu/drivers/ozone.c | 5 ++++- menu/drivers/xmb.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 5af0c5df8ee..ecd00f18d95 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -4191,7 +4191,10 @@ static void ozone_update_content_metadata(ozone_handle_t *ozone) /* Fill entry enumeration */ if (show_entry_idx) { - unsigned long _entry = (unsigned long)(playlist_index + 1); + unsigned long _entry = menu_entries_search_get_terms() + ? (unsigned long)(menu_st->selection_ptr + 1) + : (unsigned long)(playlist_index + 1); + if (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST) _entry = (unsigned long)(selection + 1); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 3f0447a09cb..524d213075c 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1660,6 +1660,7 @@ static void xmb_selection_pointer_changed( if (xmb->entry_idx_enabled) { size_t entry_idx_selection = selection + 1; + size_t list_size = MENU_LIST_GET_SELECTION(menu_list, 0)->size; unsigned entry_idx_offset = xmb->entry_index_offset; bool show_entry_idx = (xmb->is_playlist || xmb->is_explore_list) ? true : false; @@ -1676,7 +1677,7 @@ static void xmb_selection_pointer_changed( else snprintf(xmb->entry_index_str, sizeof(xmb->entry_index_str), "%lu/%lu", (unsigned long)entry_idx_selection, - (unsigned long)xmb->list_size); + (unsigned long)list_size); } ia = xmb->items_active_alpha;