mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Cleanups
This commit is contained in:
parent
79222de018
commit
51823f7169
@ -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))
|
||||
|
@ -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)
|
||||
|
20
dynamic.h
20
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:
|
||||
|
Loading…
Reference in New Issue
Block a user