mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Turn menu_displaylist_parse_playlist_history into a generic
function
This commit is contained in:
parent
9e6d771bcf
commit
34d654b0f3
@ -4040,7 +4040,10 @@ void menu_displaylist_reset_filebrowser(void)
|
|||||||
static void menu_displaylist_parse_playlist_history(
|
static void menu_displaylist_parse_playlist_history(
|
||||||
menu_handle_t *menu,
|
menu_handle_t *menu,
|
||||||
menu_displaylist_info_t *info,
|
menu_displaylist_info_t *info,
|
||||||
playlist_t *playlist, int *ret)
|
playlist_t *playlist,
|
||||||
|
const char *playlist_name,
|
||||||
|
const char *playlist_path,
|
||||||
|
int *ret)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
@ -4051,12 +4054,12 @@ static void menu_displaylist_parse_playlist_history(
|
|||||||
if (!playlist)
|
if (!playlist)
|
||||||
command_event(CMD_EVENT_HISTORY_INIT, NULL);
|
command_event(CMD_EVENT_HISTORY_INIT, NULL);
|
||||||
|
|
||||||
strlcpy(path_playlist, "history", sizeof(path_playlist));
|
strlcpy(path_playlist, playlist_name, sizeof(path_playlist));
|
||||||
*ret = menu_displaylist_parse_playlist(info,
|
*ret = menu_displaylist_parse_playlist(info,
|
||||||
playlist, path_playlist, true);
|
playlist, path_playlist, true);
|
||||||
strlcpy(
|
strlcpy(
|
||||||
menu->db_playlist_file,
|
menu->db_playlist_file,
|
||||||
settings->path.content_history,
|
playlist_path,
|
||||||
sizeof(menu->db_playlist_file));
|
sizeof(menu->db_playlist_file));
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_INIT,
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_INIT,
|
||||||
@ -5510,7 +5513,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
case DISPLAYLIST_HISTORY:
|
case DISPLAYLIST_HISTORY:
|
||||||
menu_displaylist_parse_playlist_history(menu, info,
|
menu_displaylist_parse_playlist_history(menu, info,
|
||||||
g_defaults.content_history, &ret);
|
g_defaults.content_history,
|
||||||
|
"history",
|
||||||
|
settings->path.content_history,
|
||||||
|
&ret);
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user