From 19e6a099c1247c81248f38bf8ab16c33479b84c3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 10 Oct 2013 18:17:51 +0200 Subject: [PATCH] (core_info.c) Add hack for Android core libraries --- core_info.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core_info.c b/core_info.c index 8ce3727442..f34b2cb899 100644 --- a/core_info.c +++ b/core_info.c @@ -57,10 +57,18 @@ core_info_list_t *core_info_list_new(const char *modules_path) // Libs are deployed with a suffix (*_ios.dylib, *_qnx.so, etc). char buffer[PATH_MAX]; strlcpy(buffer, contents->elems[i].data, sizeof(buffer)); +#ifdef ANDROID + // Android libs have to be prefixed with 'lib' - so cores begin with 'libretro_' prefix + char *substr = strstr(buffer, "libretro_"); + if (substr) + *substr = '\0'; + fill_pathname(info_path, buffer, "_libretro.info", sizeof(info_path)); +#else char *substr = strrchr(buffer, '_'); if (substr) *substr = '\0'; fill_pathname(info_path, buffer, ".info", sizeof(info_path)); +#endif #else fill_pathname(info_path, core_info[i].path, ".info", sizeof(info_path)); #endif