mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Menu) Create menu->playlist
This commit is contained in:
parent
719b0bf016
commit
1222bb609b
@ -222,6 +222,10 @@ void menu_free(menu_handle_t *menu)
|
||||
return;
|
||||
|
||||
menu_free_list(menu);
|
||||
|
||||
if (menu->playlist)
|
||||
content_playlist_free(menu->playlist);
|
||||
menu->playlist = NULL;
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
if (menu->shader)
|
||||
|
@ -220,6 +220,7 @@ typedef struct
|
||||
animation_t *animation;
|
||||
bool animation_is_active;
|
||||
|
||||
content_playlist_t *playlist;
|
||||
char db_playlist_file[PATH_MAX_LENGTH];
|
||||
} menu_handle_t;
|
||||
|
||||
|
@ -43,7 +43,6 @@ static int menu_action_setting_set_current_string_path(
|
||||
static int action_ok_playlist_entry(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
bool free_list = false;
|
||||
size_t selection_ptr = 0;
|
||||
content_playlist_t *playlist = g_defaults.history;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
@ -53,12 +52,10 @@ static int action_ok_playlist_entry(const char *path,
|
||||
if (!strcmp(label, "collection") ||
|
||||
!strcmp(label, "rdb_entry_start_game"))
|
||||
{
|
||||
free_list = true;
|
||||
|
||||
playlist = content_playlist_init(menu->db_playlist_file, 1000);
|
||||
|
||||
if (!playlist)
|
||||
if (!menu->playlist)
|
||||
return -1;
|
||||
|
||||
playlist = menu->playlist;
|
||||
}
|
||||
|
||||
selection_ptr = menu->navigation.selection_ptr;
|
||||
@ -68,9 +65,6 @@ static int action_ok_playlist_entry(const char *path,
|
||||
|
||||
rarch_playlist_load_content(playlist, selection_ptr);
|
||||
|
||||
if (free_list)
|
||||
content_playlist_free(playlist);
|
||||
|
||||
menu_list_flush_stack(menu->menu_list, NULL, MENU_SETTINGS);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user