aboutsummaryrefslogtreecommitdiff
path: root/addons/library.xbmc.gui
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.gui
parentf95b6b764a76c5e19269a4cb82c13840a29af4e4 (diff)
[droid/pvr] add android path checks. credit @memphiz
Diffstat (limited to 'addons/library.xbmc.gui')
-rw-r--r--addons/library.xbmc.gui/libXBMC_gui.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/library.xbmc.gui/libXBMC_gui.h b/addons/library.xbmc.gui/libXBMC_gui.h
index 023dfd7135..95d839bf30 100644
--- a/addons/library.xbmc.gui/libXBMC_gui.h
+++ b/addons/library.xbmc.gui/libXBMC_gui.h
@@ -31,7 +31,8 @@ typedef void* GUIHANDLE;
#ifdef _WIN32
#define GUI_HELPER_DLL "\\library.xbmc.gui\\libXBMC_gui" ADDON_HELPER_EXT
#else
-#define GUI_HELPER_DLL "/library.xbmc.gui/libXBMC_gui-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define GUI_HELPER_DLL_NAME "libXBMC_gui-" ADDON_HELPER_ARCH ADDON_HELPER_EXT
+#define GUI_HELPER_DLL "/library.xbmc.gui/" GUI_HELPER_DLL_NAME
#endif
#define ADDON_ACTION_PREVIOUS_MENU 10
@@ -69,6 +70,15 @@ public:
libBasePath = ((cb_array*)m_Handle)->libPath;
libBasePath += GUI_HELPER_DLL;
+#if defined(ANDROID)
+ struct stat st;
+ if(stat(libBasePath.c_str(),&st) != 0)
+ {
+ std::string tempbin = getenv("XBMC_ANDROID_LIBS");
+ libBasePath = tempbin + "/" + GUI_HELPER_DLL_NAME;
+ }
+#endif
+
m_libXBMC_gui = dlopen(libBasePath.c_str(), RTLD_LAZY);
if (m_libXBMC_gui == NULL)
{