mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 10:20:21 +00:00
(menu_displaylist.c) Sort playlist before parsing
This commit is contained in:
parent
a0457d77f3
commit
7e2a01b9aa
@ -1359,6 +1359,12 @@ static void menu_displaylist_push_horizontal_menu_list_content(
|
||||
}
|
||||
#endif
|
||||
|
||||
static int menu_displaylist_sort_playlist(const content_playlist_entry_t *a,
|
||||
const content_playlist_entry_t *b)
|
||||
{
|
||||
return strcasecmp(a->label, b->label);
|
||||
}
|
||||
|
||||
static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info)
|
||||
{
|
||||
char db_path[PATH_MAX_LENGTH];
|
||||
@ -1402,6 +1408,8 @@ static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info)
|
||||
strlcpy(path_playlist, "collection", sizeof(path_playlist));
|
||||
playlist = menu->playlist;
|
||||
|
||||
content_playlist_qsort(playlist, menu_displaylist_sort_playlist);
|
||||
|
||||
menu_displaylist_parse_playlist(info, playlist, path_playlist, false);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user