mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Don't continually free and reload db playlist if it is already
cached
This commit is contained in:
parent
295c8a29a8
commit
adbcab3912
@ -56,12 +56,19 @@ void menu_database_free(menu_handle_t *menu)
|
||||
|
||||
bool menu_database_realloc(menu_handle_t *menu, const char *path)
|
||||
{
|
||||
if (!strcmp(menu->db_playlist_file, path))
|
||||
return true;
|
||||
|
||||
menu_database_playlist_free(menu);
|
||||
|
||||
menu->db_playlist = content_playlist_init(path,
|
||||
1000);
|
||||
|
||||
if (!menu->db_playlist)
|
||||
return false;
|
||||
|
||||
strlcpy(menu->db_playlist_file, path,
|
||||
sizeof(menu->db_playlist_file));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -145,6 +145,7 @@ typedef struct
|
||||
unsigned numtweens;
|
||||
|
||||
content_playlist_t *db_playlist;
|
||||
char db_playlist_file[PATH_MAX_LENGTH];
|
||||
} menu_handle_t;
|
||||
|
||||
typedef struct menu_file_list_cbs
|
||||
|
Loading…
x
Reference in New Issue
Block a user