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));
|
strlcpy(lpl_basename, item->path, sizeof(lpl_basename));
|
||||||
path_remove_extension(lpl_basename);
|
path_remove_extension(lpl_basename);
|
||||||
|
|
||||||
if (menu->playlist)
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||||
content_playlist_free(menu->playlist);
|
|
||||||
|
|
||||||
fill_pathname_join(path_playlist,
|
fill_pathname_join(path_playlist,
|
||||||
settings->playlist_directory, item->path,
|
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];
|
char path_playlist[PATH_MAX_LENGTH];
|
||||||
content_playlist_t *playlist = NULL;
|
content_playlist_t *playlist = NULL;
|
||||||
|
|
||||||
if (menu->playlist)
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||||
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,
|
||||||
|
|
|
@ -537,18 +537,12 @@ void menu_free(menu_handle_t *menu)
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (menu->playlist)
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||||
content_playlist_free(menu->playlist);
|
|
||||||
menu->playlist = NULL;
|
|
||||||
|
|
||||||
menu_shader_free(menu);
|
menu_shader_free(menu);
|
||||||
|
|
||||||
menu_input_ctl(MENU_INPUT_CTL_DEINIT, NULL);
|
menu_input_ctl(MENU_INPUT_CTL_DEINIT, NULL);
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_DEINIT, NULL);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_DEINIT, NULL);
|
||||||
menu_driver_free(menu);
|
menu_driver_free(menu);
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_DEINIT, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_DEINIT, NULL);
|
||||||
|
|
||||||
menu_display_free();
|
menu_display_free();
|
||||||
menu_entries_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_data_own = false;
|
||||||
menu_driver_ctx = NULL;
|
menu_driver_ctx = NULL;
|
||||||
break;
|
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:
|
case RARCH_MENU_CTL_PLAYLIST_GET:
|
||||||
{
|
{
|
||||||
content_playlist_t **playlist = (content_playlist_t**)data;
|
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_UNSET_LOAD_NO_CONTENT,
|
||||||
RARCH_MENU_CTL_SYSTEM_INFO_DEINIT,
|
RARCH_MENU_CTL_SYSTEM_INFO_DEINIT,
|
||||||
RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
||||||
|
RARCH_MENU_CTL_PLAYLIST_FREE,
|
||||||
RARCH_MENU_CTL_PLAYLIST_GET
|
RARCH_MENU_CTL_PLAYLIST_GET
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue