Skip to content

Commit

Permalink
Fix playlist search index in XMB+Ozone (#17047)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos authored Sep 27, 2024
1 parent d7839bb commit 1110334
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion menu/drivers/ozone.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion menu/drivers/xmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 1110334

Please sign in to comment.