mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Create RARCH_MENU_CTL_PLAYLIST_FREE
This commit is contained in:
parent
3c28350b56
commit
7b49964d39
@ -1683,8 +1683,7 @@ static int menu_displaylist_parse_horizontal_list(menu_displaylist_info_t *info)
|
||||
strlcpy(lpl_basename, item->path, sizeof(lpl_basename));
|
||||
path_remove_extension(lpl_basename);
|
||||
|
||||
if (menu->playlist)
|
||||
content_playlist_free(menu->playlist);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||
|
||||
fill_pathname_join(path_playlist,
|
||||
settings->playlist_directory, item->path,
|
||||
@ -2916,8 +2915,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
char path_playlist[PATH_MAX_LENGTH];
|
||||
content_playlist_t *playlist = NULL;
|
||||
|
||||
if (menu->playlist)
|
||||
content_playlist_free(menu->playlist);
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||
|
||||
fill_pathname_join(path_playlist,
|
||||
settings->playlist_directory, info->path,
|
||||
|
@ -537,18 +537,12 @@ void menu_free(menu_handle_t *menu)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
if (menu->playlist)
|
||||
content_playlist_free(menu->playlist);
|
||||
menu->playlist = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||
menu_shader_free(menu);
|
||||
|
||||
menu_input_ctl(MENU_INPUT_CTL_DEINIT, NULL);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_DEINIT, NULL);
|
||||
menu_driver_free(menu);
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_DEINIT, NULL);
|
||||
|
||||
menu_display_free();
|
||||
menu_entries_free();
|
||||
|
||||
@ -666,6 +660,13 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
menu_driver_data_own = false;
|
||||
menu_driver_ctx = NULL;
|
||||
break;
|
||||
case RARCH_MENU_CTL_PLAYLIST_FREE:
|
||||
if (!menu_driver_data)
|
||||
return false;
|
||||
if (menu_driver_data->playlist)
|
||||
content_playlist_free(menu_driver_data->playlist);
|
||||
menu_driver_data->playlist = NULL;
|
||||
break;
|
||||
case RARCH_MENU_CTL_PLAYLIST_GET:
|
||||
{
|
||||
content_playlist_t **playlist = (content_playlist_t**)data;
|
||||
|
@ -116,6 +116,7 @@ enum rarch_menu_ctl_state
|
||||
RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT,
|
||||
RARCH_MENU_CTL_SYSTEM_INFO_DEINIT,
|
||||
RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
||||
RARCH_MENU_CTL_PLAYLIST_FREE,
|
||||
RARCH_MENU_CTL_PLAYLIST_GET
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user