Move core_info string to front on Android.
Searching for libretro_ at start of string would cause path to become empty.
This commit is contained in:
parent
48602cbdbb
commit
baf694d4f6
|
@ -61,13 +61,16 @@ core_info_list_t *core_info_list_new(const char *modules_path)
|
|||
// Android libs are deployed with a prefix 'lib' (libretro_*.so, etc)
|
||||
// Non-Android Libs (mobile/console) are deployed with a system name suffix (*_ios.dylib, *_qnx.so, etc).
|
||||
#ifdef ANDROID
|
||||
size_t prefix_len = strlen("libretro_");
|
||||
char *substr = strstr(info_path_base, "libretro_");
|
||||
if (substr && substr == info_path_base)
|
||||
memmove(info_path_base, info_path_base + prefix_len, strlen(info_path_base) + 1 - prefix_len);
|
||||
#else
|
||||
char *substr = strrchr(info_path_base, '_');
|
||||
#endif
|
||||
if (substr)
|
||||
*substr = '\0';
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
strlcat(info_path_base, "_libretro", sizeof(info_path_base));
|
||||
|
|
Loading…
Reference in New Issue