diff options
author | Lars Op den Kamp <lars@opdenkamp.eu> | 2012-10-15 22:12:40 +0200 |
---|---|---|
committer | Lars Op den Kamp <lars@opdenkamp.eu> | 2012-10-15 22:12:40 +0200 |
commit | 7c0635351bba9794a01bc5bfd281db597617f644 (patch) | |
tree | eb8d04e0155ed77774dbe854f0d9f5330e8d9315 /addons/library.xbmc.pvr | |
parent | f95b6b764a76c5e19269a4cb82c13840a29af4e4 (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.h | 12 |
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) { |