summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinhyung Jo <jinhyung.jo@samsung.com>2016-10-28 15:20:37 +0900
committerJinhyung Jo <jinhyung.jo@samsung.com>2016-10-28 15:26:15 +0900
commitea7ff838e05f01594197b6f724c63775fab5a6e6 (patch)
treeffcd87000fa29da3aa3730acbc9371432647df0d
parentc985f5a27b5b76b6998d7723ec68505fd59b9d95 (diff)
downloademulator-yagl-ea7ff838e05f01594197b6f724c63775fab5a6e6.tar.gz
emulator-yagl-ea7ff838e05f01594197b6f724c63775fab5a6e6.tar.bz2
emulator-yagl-ea7ff838e05f01594197b6f724c63775fab5a6e6.zip
The lib path in the 64-bit architecture was missing. I modify the lib path. Change-Id: I65e0ebbce42a782605b4d2c764fc5ba596603db0 Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
-rw-r--r--EGL/yagl_egl_state.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/EGL/yagl_egl_state.c b/EGL/yagl_egl_state.c
index 3e56841..03062c5 100644
--- a/EGL/yagl_egl_state.c
+++ b/EGL/yagl_egl_state.c
@@ -41,6 +41,12 @@
#include <pthread.h>
#include <dlfcn.h>
+#ifdef __x86_64__
+#define LIBPATH "/usr/lib64/driver/"
+#else
+#define LIBPATH "/usr/lib/driver/"
+#endif
+
struct yagl_egl_state
{
EGLint error;
@@ -74,11 +80,11 @@ void *yagl_get_gles1_sym(const char *name)
}
if (!state->gles1_handle) {
- state->gles1_handle = dlopen("/usr/lib/driver/libGLESv1_CM.so.1",
+ state->gles1_handle = dlopen(LIBPATH"libGLESv1_CM.so.1",
RTLD_NOW | RTLD_GLOBAL);
if (!state->gles1_handle) {
- state->gles1_handle = dlopen("/usr/lib/driver/libGLESv1_CM.so",
+ state->gles1_handle = dlopen(LIBPATH"libGLESv1_CM.so",
RTLD_NOW | RTLD_GLOBAL);
}
}
@@ -98,11 +104,11 @@ void *yagl_get_gles2_sym(const char *name)
void *sym = NULL;
if (!state->gles2_handle) {
- state->gles2_handle = dlopen("/usr/lib/driver/libGLESv2.so.1",
+ state->gles2_handle = dlopen(LIBPATH"libGLESv2.so.1",
RTLD_NOW | RTLD_GLOBAL);
if (!state->gles2_handle) {
- state->gles2_handle = dlopen("/usr/lib/driver/libGLESv2.so",
+ state->gles2_handle = dlopen(LIBPATH"libGLESv2.so",
RTLD_NOW | RTLD_GLOBAL);
}
}
@@ -198,7 +204,7 @@ static void yagl_egl_state_init()
* Perhaps common EGL/GLES code needs to be moved to a separate
* library in the future.
*/
- state->egl_handle = dlopen("/usr/lib/driver/libEGL.so",
+ state->egl_handle = dlopen(LIBPATH"libEGL.so",
RTLD_NOW | RTLD_GLOBAL);
pthread_setspecific(g_state_key, state);