diff --git a/command.c b/command.c index 3af331896b..ffbc37ef82 100644 --- a/command.c +++ b/command.c @@ -1886,14 +1886,11 @@ bool command_event(enum event_command cmd, void *data) #if defined(HAVE_DYNAMIC) if (string_is_empty(config_get_active_core_path())) return false; - +#endif libretro_get_system_info( config_get_active_core_path(), system, ptr); -#else - libretro_get_system_info_static(system, ptr); -#endif info_find.path = config_get_active_core_path(); if (!core_info_load(&info_find)) diff --git a/dynamic.c b/dynamic.c index 9d17974e95..5238eecdf1 100644 --- a/dynamic.c +++ b/dynamic.c @@ -168,7 +168,7 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data) } #ifndef HAVE_DYNAMIC -bool libretro_get_system_info_static(struct retro_system_info *info, +static bool libretro_get_system_info_static(struct retro_system_info *info, bool *load_no_content) { struct retro_system_info dummy_info = {0}; @@ -296,6 +296,7 @@ static dylib_t libretro_get_system_info_lib(const char *path, bool libretro_get_system_info(const char *path, struct retro_system_info *info, bool *load_no_content) { +#ifdef HAVE_DYNAMIC struct retro_system_info dummy_info = {0}; dylib_t lib = libretro_get_system_info_lib(path, &dummy_info, load_no_content); @@ -309,6 +310,9 @@ bool libretro_get_system_info(const char *path, info->valid_extensions = strdup(dummy_info.valid_extensions); dylib_close(lib); return true; +#else + return libretro_get_system_info_static(info, load_no_content); +#endif } static void load_dynamic_core(void) diff --git a/dynamic.h b/dynamic.h index 9ea5a6cce0..af0281b957 100644 --- a/dynamic.h +++ b/dynamic.h @@ -23,10 +23,6 @@ #include "core_type.h" -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - RETRO_BEGIN_DECLS /** @@ -49,7 +45,6 @@ RETRO_BEGIN_DECLS void libretro_get_environment_info(void (*)(retro_environment_t), bool *load_no_content); -#ifdef HAVE_DYNAMIC /** * libretro_get_system_info: * @path : Path to libretro library. @@ -64,21 +59,6 @@ void libretro_get_environment_info(void (*)(retro_environment_t), **/ bool libretro_get_system_info(const char *path, struct retro_system_info *info, bool *load_no_content); -#else -/** - * libretro_get_system_info_static: - * @info : System info information. - * @load_no_content : If true, core should be able to auto-start - * without any content loaded. - * - * Gets system info from the current statically linked libretro library. - * The struct returned must be freed as strings are allocated dynamically. - * - * Returns: true (1) if successful, otherwise false (0). - **/ -bool libretro_get_system_info_static(struct retro_system_info *info, - bool *load_no_content); -#endif /** * libretro_free_system_info: