mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Cleanup menu_displaylist_parse
This commit is contained in:
parent
1222bb609b
commit
8b24cd8c80
@ -1895,7 +1895,6 @@ static int menu_displaylist_parse(menu_displaylist_info_t *info,
|
|||||||
case DISPLAYLIST_HISTORY:
|
case DISPLAYLIST_HISTORY:
|
||||||
{
|
{
|
||||||
char path_playlist[PATH_MAX_LENGTH];
|
char path_playlist[PATH_MAX_LENGTH];
|
||||||
bool free_list = false;
|
|
||||||
content_playlist_t *playlist = NULL;
|
content_playlist_t *playlist = NULL;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -1905,13 +1904,16 @@ static int menu_displaylist_parse(menu_displaylist_info_t *info,
|
|||||||
strlcpy(path_playlist, "history", sizeof(path_playlist));
|
strlcpy(path_playlist, "history", sizeof(path_playlist));
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
||||||
|
if (menu->playlist)
|
||||||
|
content_playlist_free(menu->playlist);
|
||||||
|
|
||||||
fill_pathname_join(path_playlist,
|
fill_pathname_join(path_playlist,
|
||||||
settings->playlist_directory, info->path,
|
settings->playlist_directory, info->path,
|
||||||
sizeof(path_playlist));
|
sizeof(path_playlist));
|
||||||
playlist = content_playlist_init(path_playlist,
|
menu->playlist = content_playlist_init(path_playlist,
|
||||||
999);
|
999);
|
||||||
strlcpy(path_playlist, "collection", sizeof(path_playlist));
|
strlcpy(path_playlist, "collection", sizeof(path_playlist));
|
||||||
free_list = true;
|
playlist = menu->playlist;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -1924,9 +1926,6 @@ static int menu_displaylist_parse(menu_displaylist_info_t *info,
|
|||||||
*need_refresh = true;
|
*need_refresh = true;
|
||||||
*need_push = true;
|
*need_push = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (free_list)
|
|
||||||
content_playlist_free(playlist);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_OPTIONS_DISK:
|
case DISPLAYLIST_OPTIONS_DISK:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user