diff --git a/src/dispatch_common.c b/src/dispatch_common.c index 17d0c5e..b521b1b 100644 --- a/src/dispatch_common.c +++ b/src/dispatch_common.c @@ -568,16 +568,28 @@ epoxy_conservative_has_gl_extension(const char *ext) return epoxy_internal_has_gl_extension(ext, true); } +void * +epoxy_conservative_egl_dlsym(const char *name, bool exit_if_fails) +{ + return do_dlsym(&api.egl_handle, EGL_LIB, name, exit_if_fails); +} + void * epoxy_egl_dlsym(const char *name) { - return do_dlsym(&api.egl_handle, EGL_LIB, name, true); + return epoxy_conservative_egl_dlsym(name, true); +} + +void * +epoxy_conservative_glx_dlsym(const char *name, bool exit_if_fails) +{ + return do_dlsym(&api.glx_handle, GLX_LIB, name, exit_if_fails); } void * epoxy_glx_dlsym(const char *name) { - return do_dlsym(&api.glx_handle, GLX_LIB, name, true); + return epoxy_conservative_glx_dlsym(name, true); } void * diff --git a/src/dispatch_common.h b/src/dispatch_common.h index 2cc566a..9d38a78 100644 --- a/src/dispatch_common.h +++ b/src/dispatch_common.h @@ -162,6 +162,8 @@ bool epoxy_conservative_has_glx_extension(const char *name); int epoxy_conservative_egl_version(void); bool epoxy_conservative_has_egl_extension(const char *name); bool epoxy_conservative_has_wgl_extension(const char *name); +void *epoxy_conservative_egl_dlsym(const char *name, bool exit_if_fails); +void *epoxy_conservative_glx_dlsym(const char *name, bool exit_if_fails); bool epoxy_extension_in_string(const char *extension_list, const char *ext);