Music history list no longer tied to HAVE_FFMPEG

This commit is contained in:
twinaphex 2017-05-28 00:00:51 +02:00
parent 9438545bca
commit 8e2753cc53
2 changed files with 9 additions and 8 deletions

View File

@ -1953,6 +1953,13 @@ bool command_event(enum event_command cmd, void *data)
} }
g_defaults.content_history = NULL; g_defaults.content_history = NULL;
if (g_defaults.music_history)
{
playlist_write_file(g_defaults.music_history);
playlist_free(g_defaults.music_history);
}
g_defaults.music_history = NULL;
#ifdef HAVE_FFMPEG #ifdef HAVE_FFMPEG
if (g_defaults.video_history) if (g_defaults.video_history)
{ {
@ -1961,12 +1968,6 @@ bool command_event(enum event_command cmd, void *data)
} }
g_defaults.video_history = NULL; g_defaults.video_history = NULL;
if (g_defaults.music_history)
{
playlist_write_file(g_defaults.music_history);
playlist_free(g_defaults.music_history);
}
g_defaults.music_history = NULL;
#endif #endif
#ifdef HAVE_IMAGEVIEWER #ifdef HAVE_IMAGEVIEWER
@ -1995,7 +1996,6 @@ bool command_event(enum event_command cmd, void *data)
settings->paths.path_content_history, settings->paths.path_content_history,
content_history_size); content_history_size);
#ifdef HAVE_FFMPEG
RARCH_LOG("%s: [%s].\n", RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE), msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->paths.path_content_music_history); settings->paths.path_content_music_history);
@ -2003,6 +2003,7 @@ bool command_event(enum event_command cmd, void *data)
settings->paths.path_content_music_history, settings->paths.path_content_music_history,
content_history_size); content_history_size);
#ifdef HAVE_FFMPEG
RARCH_LOG("%s: [%s].\n", RARCH_LOG("%s: [%s].\n",
msg_hash_to_str(MSG_LOADING_HISTORY_FILE), msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
settings->paths.path_content_video_history); settings->paths.path_content_video_history);

View File

@ -105,9 +105,9 @@ struct defaults
#ifdef HAVE_IMAGEVIEWER #ifdef HAVE_IMAGEVIEWER
playlist_t *image_history; playlist_t *image_history;
#endif #endif
playlist_t *music_history;
#ifdef HAVE_FFMPEG #ifdef HAVE_FFMPEG
playlist_t *video_history; playlist_t *video_history;
playlist_t *music_history;
#endif #endif
#endif #endif
}; };