Simplifications

This commit is contained in:
twinaphex 2016-01-27 08:17:12 +01:00
parent 392fee9023
commit 6a7b2aed5c
5 changed files with 13 additions and 14 deletions

View File

@ -592,8 +592,8 @@ static bool event_init_core(void)
&& !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
rarch_ctl(RARCH_CTL_SET_PATHS_REDIRECT, NULL);
rarch_ctl(RARCH_CTL_VERIFY_API_VERSION, NULL);
core_ctl(CORE_CTL_RETRO_INIT, NULL);
if (!core_ctl(CORE_CTL_RETRO_INIT, NULL))
return false;
global->sram.use = rarch_ctl(RARCH_CTL_IS_PLAIN_CORE, NULL)
&& !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL);

View File

@ -260,7 +260,11 @@ bool core_ctl(enum core_ctl_state state, void *data)
retro_set_rewind_callbacks();
break;
case CORE_CTL_INIT:
return retro_init_libretro_cbs(&retro_ctx);
if (!core_ctl(CORE_CTL_VERIFY_API_VERSION, NULL))
return false;
if (!retro_init_libretro_cbs(&retro_ctx))
return false;
break;
case CORE_CTL_DEINIT:
return retro_uninit_libretro_cbs(&retro_ctx);
case CORE_CTL_VERIFY_API_VERSION:

View File

@ -74,6 +74,12 @@ enum core_ctl_state
CORE_CTL_RETRO_UNSERIALIZE,
/* Compare libretro core API version against API version
* used by RetroArch.
*
* TODO - when libretro v2 gets added, allow for switching
* between libretro version backend dynamically.
*/
CORE_CTL_VERIFY_API_VERSION
};

View File

@ -1477,9 +1477,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
#endif
}
break;
case RARCH_CTL_VERIFY_API_VERSION:
core_ctl(CORE_CTL_VERIFY_API_VERSION, NULL);
break;
case RARCH_CTL_FILL_PATHNAMES:
rarch_init_savefile_paths();
bsv_movie_set_path(global->name.savefile);

View File

@ -94,14 +94,6 @@ enum rarch_ctl_state
RARCH_CTL_FORCE_QUIT,
/* Compare libretro core API version against API version
* used by RetroArch.
*
* TODO - when libretro v2 gets added, allow for switching
* between libretro version backend dynamically.
*/
RARCH_CTL_VERIFY_API_VERSION,
/* Validates CPU features for given processor architecture.
* Make sure we haven't compiled for something we cannot run.
* Ideally, code would get swapped out depending on CPU support,