This commit is contained in:
twinaphex 2016-09-12 18:16:42 +02:00
parent 79222de018
commit 51823f7169
3 changed files with 6 additions and 25 deletions

View File

@ -1886,14 +1886,11 @@ bool command_event(enum event_command cmd, void *data)
#if defined(HAVE_DYNAMIC) #if defined(HAVE_DYNAMIC)
if (string_is_empty(config_get_active_core_path())) if (string_is_empty(config_get_active_core_path()))
return false; return false;
#endif
libretro_get_system_info( libretro_get_system_info(
config_get_active_core_path(), config_get_active_core_path(),
system, system,
ptr); ptr);
#else
libretro_get_system_info_static(system, ptr);
#endif
info_find.path = config_get_active_core_path(); info_find.path = config_get_active_core_path();
if (!core_info_load(&info_find)) if (!core_info_load(&info_find))

View File

@ -168,7 +168,7 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data)
} }
#ifndef HAVE_DYNAMIC #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) bool *load_no_content)
{ {
struct retro_system_info dummy_info = {0}; 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, bool libretro_get_system_info(const char *path,
struct retro_system_info *info, bool *load_no_content) struct retro_system_info *info, bool *load_no_content)
{ {
#ifdef HAVE_DYNAMIC
struct retro_system_info dummy_info = {0}; struct retro_system_info dummy_info = {0};
dylib_t lib = libretro_get_system_info_lib(path, dylib_t lib = libretro_get_system_info_lib(path,
&dummy_info, load_no_content); &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); info->valid_extensions = strdup(dummy_info.valid_extensions);
dylib_close(lib); dylib_close(lib);
return true; return true;
#else
return libretro_get_system_info_static(info, load_no_content);
#endif
} }
static void load_dynamic_core(void) static void load_dynamic_core(void)

View File

@ -23,10 +23,6 @@
#include "core_type.h" #include "core_type.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
RETRO_BEGIN_DECLS RETRO_BEGIN_DECLS
/** /**
@ -49,7 +45,6 @@ RETRO_BEGIN_DECLS
void libretro_get_environment_info(void (*)(retro_environment_t), void libretro_get_environment_info(void (*)(retro_environment_t),
bool *load_no_content); bool *load_no_content);
#ifdef HAVE_DYNAMIC
/** /**
* libretro_get_system_info: * libretro_get_system_info:
* @path : Path to libretro library. * @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, bool libretro_get_system_info(const char *path,
struct retro_system_info *info, bool *load_no_content); 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: * libretro_free_system_info: