aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2021-01-20 15:18:00 +0000
committerGitHub <noreply@github.com>2021-01-20 15:18:00 +0000
commitde08cf3479ca06ff921c584eeee6280e5a135f99 (patch)
tree1eae5c9fd58211c0eabf2f8db4605f005f70335b
parent7ec320d1db05d6ef1045411c2b4590a9d04540a2 (diff)
parent4994c48172e94ca81c000597e0abc0ea0e682b3c (diff)
downloadlibepoxy-de08cf3479ca06ff921c584eeee6280e5a135f99.tar.gz
Merge pull request #238 from anholt/pull-229-alt
Fix some bugs in loading OpenGL/GLX/EGL libraries
-rw-r--r--src/dispatch_common.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index 9977a02..62b7134 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -674,9 +674,13 @@ epoxy_load_gl(void)
if (!api.gl_handle)
get_dlopen_handle(&api.gl_handle, OPENGL_LIB, false, true);
#endif
-
- get_dlopen_handle(&api.glx_handle, GLX_LIB, true, true);
- api.gl_handle = api.glx_handle;
+ if (!api.gl_handle) {
+ get_dlopen_handle(&api.gl_handle, GLX_LIB, true, true);
+#if PLATFORM_HAS_GLX
+ if (!api.glx_handle)
+ api.glx_handle = api.gl_handle;
+#endif
+ }
#endif
}