mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Cleanups
This commit is contained in:
parent
0adeaeaf1e
commit
02e1c141a1
@ -3845,37 +3845,23 @@ static void menu_displaylist_parse_playlist_history(
|
|||||||
const char *playlist_path,
|
const char *playlist_path,
|
||||||
int *ret)
|
int *ret)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
char path_playlist[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
if (settings->history_list_enable)
|
path_playlist[0] = '\0';
|
||||||
{
|
|
||||||
char path_playlist[PATH_MAX_LENGTH];
|
|
||||||
|
|
||||||
path_playlist[0] = '\0';
|
if (!playlist)
|
||||||
|
command_event(CMD_EVENT_HISTORY_INIT, NULL);
|
||||||
|
|
||||||
if (!playlist)
|
strlcpy(path_playlist, playlist_name, sizeof(path_playlist));
|
||||||
command_event(CMD_EVENT_HISTORY_INIT, NULL);
|
*ret = menu_displaylist_parse_playlist(info,
|
||||||
|
playlist, path_playlist, true);
|
||||||
strlcpy(path_playlist, playlist_name, sizeof(path_playlist));
|
strlcpy(
|
||||||
*ret = menu_displaylist_parse_playlist(info,
|
menu->db_playlist_file,
|
||||||
playlist, path_playlist, true);
|
playlist_path,
|
||||||
strlcpy(
|
sizeof(menu->db_playlist_file));
|
||||||
menu->db_playlist_file,
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||||
playlist_path,
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_INIT,
|
||||||
sizeof(menu->db_playlist_file));
|
(void*)menu->db_playlist_file);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_INIT,
|
|
||||||
(void*)menu->db_playlist_file);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
menu_entries_append_enum(info->list,
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_HISTORY_AVAILABLE),
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE),
|
|
||||||
MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE,
|
|
||||||
MENU_INFO_MESSAGE, 0, 0);
|
|
||||||
*ret = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||||
@ -5546,11 +5532,21 @@ 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,
|
if (settings->history_list_enable)
|
||||||
g_defaults.content_history,
|
menu_displaylist_parse_playlist_history(menu, info,
|
||||||
"history",
|
g_defaults.content_history,
|
||||||
settings->path.content_history,
|
"history",
|
||||||
&ret);
|
settings->path.content_history,
|
||||||
|
&ret);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu_entries_append_enum(info->list,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_HISTORY_AVAILABLE),
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE),
|
||||||
|
MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE,
|
||||||
|
MENU_INFO_MESSAGE, 0, 0);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
@ -5560,11 +5556,21 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
case DISPLAYLIST_IMAGES_HISTORY:
|
case DISPLAYLIST_IMAGES_HISTORY:
|
||||||
#ifdef HAVE_IMAGEVIEWER
|
#ifdef HAVE_IMAGEVIEWER
|
||||||
menu_displaylist_parse_playlist_history(menu, info,
|
if (settings->history_list_enable)
|
||||||
g_defaults.image_history,
|
menu_displaylist_parse_playlist_history(menu, info,
|
||||||
"images_history",
|
g_defaults.image_history,
|
||||||
settings->path.content_image_history,
|
"images_history",
|
||||||
&ret);
|
settings->path.content_image_history,
|
||||||
|
&ret);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu_entries_append_enum(info->list,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_HISTORY_AVAILABLE),
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE),
|
||||||
|
MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE,
|
||||||
|
MENU_INFO_MESSAGE, 0, 0);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
@ -5575,11 +5581,21 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MUSIC_HISTORY:
|
case DISPLAYLIST_MUSIC_HISTORY:
|
||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
menu_displaylist_parse_playlist_history(menu, info,
|
if (settings->history_list_enable)
|
||||||
g_defaults.music_history,
|
menu_displaylist_parse_playlist_history(menu, info,
|
||||||
"music_history",
|
g_defaults.music_history,
|
||||||
settings->path.content_music_history,
|
"music_history",
|
||||||
&ret);
|
settings->path.content_music_history,
|
||||||
|
&ret);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu_entries_append_enum(info->list,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_HISTORY_AVAILABLE),
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE),
|
||||||
|
MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE,
|
||||||
|
MENU_INFO_MESSAGE, 0, 0);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
@ -5590,11 +5606,21 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
case DISPLAYLIST_VIDEO_HISTORY:
|
case DISPLAYLIST_VIDEO_HISTORY:
|
||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
menu_displaylist_parse_playlist_history(menu, info,
|
if (settings->history_list_enable)
|
||||||
g_defaults.video_history,
|
menu_displaylist_parse_playlist_history(menu, info,
|
||||||
"video_history",
|
g_defaults.video_history,
|
||||||
settings->path.content_video_history,
|
"video_history",
|
||||||
&ret);
|
settings->path.content_video_history,
|
||||||
|
&ret);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu_entries_append_enum(info->list,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_HISTORY_AVAILABLE),
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE),
|
||||||
|
MENU_ENUM_LABEL_NO_HISTORY_AVAILABLE,
|
||||||
|
MENU_INFO_MESSAGE, 0, 0);
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user