implement deferred loading for consoles

This commit is contained in:
ToadKing 2013-10-07 22:33:02 -04:00
parent c2b55b9974
commit a999b56f33

View File

@ -1300,17 +1300,20 @@ static int rgui_iterate(void *data, unsigned action)
if (menu_type == RGUI_SETTINGS_DEFERRED_CORE)
{
// FIXME: Add for consoles.
#ifdef HAVE_DYNAMIC
strlcpy(g_settings.libretro, path, sizeof(g_settings.libretro));
strlcpy(g_extern.fullpath, rgui->deferred_path, sizeof(g_extern.fullpath));
#ifdef HAVE_DYNAMIC
libretro_free_system_info(&rgui->info);
libretro_get_system_info(g_settings.libretro, &rgui->info,
&rgui->load_no_rom);
strlcpy(g_extern.fullpath, rgui->deferred_path, sizeof(g_extern.fullpath));
g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME);
#else
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, (void*)g_settings.libretro);
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)g_extern.fullpath);
#endif
rgui->msg_force = true;
ret = -1;
#endif
rgui_flush_menu_stack_type(rgui, RGUI_SETTINGS);
}
else if (menu_type == RGUI_SETTINGS_CORE)
@ -1457,13 +1460,15 @@ static int rgui_iterate(void *data, unsigned action)
if (supported == 1) // Can make a decision right now.
{
strlcpy(g_extern.fullpath, rgui->deferred_path, sizeof(g_extern.fullpath));
strlcpy(g_settings.libretro, info->path, sizeof(g_settings.libretro));
#ifdef HAVE_DYNAMIC
libretro_free_system_info(&rgui->info);
libretro_get_system_info(g_settings.libretro, &rgui->info,
&rgui->load_no_rom);
#else
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, (void*)g_settings.libretro);
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)g_extern.fullpath);
#endif
g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME);