aboutsummaryrefslogtreecommitdiff
path: root/addons/library.xbmc.addon
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2012-10-15 22:12:40 +0200
committerLars Op den Kamp <lars@opdenkamp.eu>2012-10-15 22:12:40 +0200
commit7c0635351bba9794a01bc5bfd281db597617f644 (patch)
treeeb8d04e0155ed77774dbe854f0d9f5330e8d9315 /addons/library.xbmc.addon
parentf95b6b764a76c5e19269a4cb82c13840a29af4e4 (diff)
[droid/pvr] add android path checks. credit @memphiz
Diffstat (limited to 'addons/library.xbmc.addon')
-rw-r--r--addons/library.xbmc.addon/libXBMC_addon.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/addons/library.xbmc.addon/libXBMC_addon.h b/addons/library.xbmc.addon/libXBMC_addon.h
index c1a3116c91..a7348c19e0 100644
--- a/addons/library.xbmc.addon/libXBMC_addon.h
+++ b/addons/library.xbmc.addon/libXBMC_addon.h
@@ -59,7 +59,11 @@
#endif
#include <dlfcn.h> // linux+osx
#define ADDON_HELPER_EXT ".so"
-#define ADDON_DLL "/library.xbmc.addon/libXBMC_addon-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define ADDON_DLL_NAME "libXBMC_addon-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define ADDON_DLL "/library.xbmc.addon/" ADDON_DLL_NAME
+#endif
+#if defined(ANDROID)
+#include <sys/stat.h>
#endif
#ifdef LOG_DEBUG
@@ -118,6 +122,15 @@ namespace ADDON
libBasePath = ((cb_array*)m_Handle)->libPath;
libBasePath += ADDON_DLL;
+#if defined(ANDROID)
+ struct stat st;
+ if(stat(libBasePath.c_str(),&st) != 0)
+ {
+ std::string tempbin = getenv("XBMC_ANDROID_LIBS");
+ libBasePath = tempbin + "/" + ADDON_DLL_NAME;
+ }
+#endif
+
m_libXBMC_addon = dlopen(libBasePath.c_str(), RTLD_LAZY);
if (m_libXBMC_addon == NULL)
{