(Menu) Split up pushing to history playlist action as separate function

This commit is contained in:
twinaphex 2014-10-11 16:52:52 +02:00
parent 65bc796011
commit 7105bc3b17

View File

@ -77,31 +77,32 @@ static void menu_environment_get(int *argc, char *argv[],
wrap_args->touched = true;
}
static void push_to_history_playlist(void)
{
if (*g_extern.fullpath)
{
char tmp[PATH_MAX];
char str[PATH_MAX];
fill_pathname_base(tmp, g_extern.fullpath, sizeof(tmp));
snprintf(str, sizeof(str), "INFO - Loading %s ...", tmp);
msg_queue_push(g_extern.msg_queue, str, 1, 1);
}
rarch_playlist_push(g_defaults.history,
g_extern.fullpath,
g_settings.libretro,
&g_extern.menu.info);
}
bool load_menu_content(void)
{
if (*g_extern.fullpath || (driver.menu && driver.menu->load_no_content))
{
if (*g_extern.fullpath)
{
char tmp[PATH_MAX];
char str[PATH_MAX];
fill_pathname_base(tmp, g_extern.fullpath, sizeof(tmp));
snprintf(str, sizeof(str), "INFO - Loading %s ...", tmp);
msg_queue_push(g_extern.msg_queue, str, 1, 1);
}
rarch_playlist_push(g_defaults.history,
g_extern.fullpath,
g_settings.libretro,
&g_extern.menu.info);
}
push_to_history_playlist();
/* redraw menu frame */
if (driver.menu)
{
driver.menu->msg_force = true;
}
if (driver.menu_ctx && driver.menu_ctx->backend &&
driver.menu_ctx->backend->iterate)
@ -159,7 +160,6 @@ void *menu_init(const void *data)
menu->push_start_screen = g_settings.menu_show_start_screen;
g_settings.menu_show_start_screen = false;
menu->current_pad = 0;
update_libretro_info(&g_extern.menu.info);