Fix playlist search index in XMB+Ozone (#17047)

This commit is contained in:
sonninnos 2024-09-28 00:36:32 +03:00 committed by GitHub
parent d7839bbd7d
commit 11103347c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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;