# HG changeset patch # User reimar # Date 1367660684 0 # Node ID cf45e1421a7188dfa3d870993935ce2ce2a147ac # Parent 60f5fa4537195a075bc7759812ccfbe42c185e1b Search GLES library in more locations. diff -r 60f5fa453719 -r cf45e1421a71 libvo/gl_common.c --- a/libvo/gl_common.c Sat May 04 09:44:42 2013 +0000 +++ b/libvo/gl_common.c Sat May 04 09:44:44 2013 +0000 @@ -2232,7 +2232,16 @@ static void *eglgpa(const GLubyte *name) { void *res = eglGetProcAddress(name); if (!res) { - void *h = dlopen("/usr/lib/libGLESv1_CM.so", RTLD_LAZY); + static const char * const paths[] = { + "/usr/lib/libGLESv1_CM.so", + "/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so", + "/usr/lib/i386-linux-gnu/libGLESv1_CM.so", + NULL}; + int i; + void *h = NULL; + for (i = 0; !h && paths[i]; i++) + h = dlopen(paths[i], RTLD_LAZY); + if (!h) return NULL; res = dlsym(h, name); dlclose(h); }