aboutsummaryrefslogtreecommitdiff
path: root/addons/library.xbmc.pvr
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.pvr
parentf95b6b764a76c5e19269a4cb82c13840a29af4e4 (diff)
[droid/pvr] add android path checks. credit @memphiz
Diffstat (limited to 'addons/library.xbmc.pvr')
-rw-r--r--addons/library.xbmc.pvr/libXBMC_pvr.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/library.xbmc.pvr/libXBMC_pvr.h b/addons/library.xbmc.pvr/libXBMC_pvr.h
index 086316061c..5db2e9280e 100644
--- a/addons/library.xbmc.pvr/libXBMC_pvr.h
+++ b/addons/library.xbmc.pvr/libXBMC_pvr.h
@@ -30,7 +30,8 @@
#ifdef _WIN32
#define PVR_HELPER_DLL "\\library.xbmc.pvr\\libXBMC_pvr" ADDON_HELPER_EXT
#else
-#define PVR_HELPER_DLL "/library.xbmc.pvr/libXBMC_pvr-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define PVR_HELPER_DLL_NAME "libXBMC_pvr-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define PVR_HELPER_DLL "/library.xbmc.pvr/" PVR_HELPER_DLL_NAME
#endif
#define DVD_TIME_BASE 1000000
@@ -67,6 +68,15 @@ public:
libBasePath = ((cb_array*)m_Handle)->libPath;
libBasePath += PVR_HELPER_DLL;
+#if defined(ANDROID)
+ struct stat st;
+ if(stat(libBasePath.c_str(),&st) != 0)
+ {
+ std::string tempbin = getenv("XBMC_ANDROID_LIBS");
+ libBasePath = tempbin + "/" + PVR_HELPER_DLL_NAME;
+ }
+#endif
+
m_libXBMC_pvr = dlopen(libBasePath.c_str(), RTLD_LAZY);
if (m_libXBMC_pvr == NULL)
{