mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Make init_core a bit more readable
This commit is contained in:
parent
3d1bef924e
commit
565a651810
52
retroarch.c
52
retroarch.c
@ -2001,6 +2001,35 @@ static void deinit_core(void)
|
|||||||
uninit_libretro_sym();
|
uninit_libretro_sym();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool init_content(void)
|
||||||
|
{
|
||||||
|
/* No content to be loaded for dummy core,
|
||||||
|
* just successfully exit. */
|
||||||
|
if (g_extern.libretro_dummy)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!g_extern.libretro_no_content)
|
||||||
|
fill_pathnames();
|
||||||
|
|
||||||
|
if (!init_content_file())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!g_extern.libretro_no_content)
|
||||||
|
{
|
||||||
|
set_savestate_auto_index();
|
||||||
|
|
||||||
|
if (load_save_files())
|
||||||
|
RARCH_LOG("Skipping SRAM load.\n");
|
||||||
|
|
||||||
|
load_auto_state();
|
||||||
|
|
||||||
|
rarch_main_command(RARCH_CMD_BSV_MOVIE_INIT);
|
||||||
|
rarch_main_command(RARCH_CMD_NETPLAY_INIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool init_core(void)
|
static bool init_core(void)
|
||||||
{
|
{
|
||||||
verify_api_version();
|
verify_api_version();
|
||||||
@ -2009,27 +2038,8 @@ static bool init_core(void)
|
|||||||
g_extern.use_sram = !g_extern.libretro_dummy &&
|
g_extern.use_sram = !g_extern.libretro_dummy &&
|
||||||
!g_extern.libretro_no_content;
|
!g_extern.libretro_no_content;
|
||||||
|
|
||||||
if (!g_extern.libretro_dummy)
|
if (!init_content())
|
||||||
{
|
return false;
|
||||||
if (!g_extern.libretro_no_content)
|
|
||||||
fill_pathnames();
|
|
||||||
|
|
||||||
if (!init_content_file())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!g_extern.libretro_no_content)
|
|
||||||
{
|
|
||||||
set_savestate_auto_index();
|
|
||||||
|
|
||||||
if (load_save_files())
|
|
||||||
RARCH_LOG("Skipping SRAM load.\n");
|
|
||||||
|
|
||||||
load_auto_state();
|
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_BSV_MOVIE_INIT);
|
|
||||||
rarch_main_command(RARCH_CMD_NETPLAY_INIT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
retro_init_libretro_cbs(&driver.retro_ctx);
|
retro_init_libretro_cbs(&driver.retro_ctx);
|
||||||
init_system_av_info();
|
init_system_av_info();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user