mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Try this instead
This commit is contained in:
parent
e2888aa5a2
commit
6cec123fc3
22
dynamic.c
22
dynamic.c
@ -318,6 +318,10 @@ static dylib_t libretro_get_system_info_lib(const char *path,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static char current_library_name[1024];
|
||||||
|
static char current_library_version[1024];
|
||||||
|
static char current_valid_extensions[1024];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* libretro_get_system_info:
|
* libretro_get_system_info:
|
||||||
* @path : Path to libretro library.
|
* @path : Path to libretro library.
|
||||||
@ -374,6 +378,24 @@ bool libretro_get_system_info(const char *path,
|
|||||||
|
|
||||||
memcpy(info, &dummy_info, sizeof(*info));
|
memcpy(info, &dummy_info, sizeof(*info));
|
||||||
|
|
||||||
|
current_library_name[0] = '\0';
|
||||||
|
current_library_version[0] = '\0';
|
||||||
|
current_valid_extensions[0] = '\0';
|
||||||
|
|
||||||
|
if (!string_is_empty(dummy_info.library_name))
|
||||||
|
strlcpy(current_library_name,
|
||||||
|
dummy_info.library_name, sizeof(current_library_name));
|
||||||
|
if (!string_is_empty(dummy_info.library_version))
|
||||||
|
strlcpy(current_library_version,
|
||||||
|
dummy_info.library_version, sizeof(current_library_version));
|
||||||
|
if (dummy_info.valid_extensions)
|
||||||
|
strlcpy(current_valid_extensions,
|
||||||
|
dummy_info.valid_extensions, sizeof(current_valid_extensions));
|
||||||
|
|
||||||
|
info->library_name = current_library_name;
|
||||||
|
info->library_version = current_library_name;
|
||||||
|
info->valid_extensions = current_valid_extensions;
|
||||||
|
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
dylib_close(lib);
|
dylib_close(lib);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user