Create static function load_dynamic_core
This commit is contained in:
parent
6596d15d81
commit
dede617727
38
dynamic.c
38
dynamic.c
|
@ -255,21 +255,9 @@ libretro_find_controller_description(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* load_symbols:
|
||||
* @type : Type of core to be loaded.
|
||||
* If CORE_TYPE_DUMMY, will
|
||||
* load dummy symbols.
|
||||
*
|
||||
* Setup libretro callback symbols.
|
||||
**/
|
||||
static void load_symbols(enum rarch_core_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CORE_TYPE_PLAIN:
|
||||
{
|
||||
#ifdef HAVE_DYNAMIC
|
||||
static void load_dynamic_core(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
function_t sym = dylib_proc(NULL, "retro_init");
|
||||
|
||||
|
@ -292,8 +280,7 @@ static void load_symbols(enum rarch_core_type type)
|
|||
/* Need to use absolute path for this setting. It can be
|
||||
* saved to content history, and a relative path would
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(settings->libretro,
|
||||
sizeof(settings->libretro));
|
||||
path_resolve_realpath(settings->libretro, sizeof(settings->libretro));
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
settings->libretro);
|
||||
|
@ -305,8 +292,25 @@ static void load_symbols(enum rarch_core_type type)
|
|||
RARCH_ERR("Error(s): %s\n", dylib_error());
|
||||
retro_fail(1, "load_dynamic()");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* load_symbols:
|
||||
* @type : Type of core to be loaded.
|
||||
* If CORE_TYPE_DUMMY, will
|
||||
* load dummy symbols.
|
||||
*
|
||||
* Setup libretro callback symbols.
|
||||
**/
|
||||
static void load_symbols(enum rarch_core_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CORE_TYPE_PLAIN:
|
||||
#ifdef HAVE_DYNAMIC
|
||||
load_dynamic_core();
|
||||
#endif
|
||||
|
||||
SYMBOL(retro_init);
|
||||
SYMBOL(retro_deinit);
|
||||
|
|
Loading…
Reference in New Issue