From 5567aa131b3b55867c374074c6bc3f0e7f7b3647 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 31 May 2014 22:02:35 +0200 Subject: gl_common: remove dlsym() fallback See previous commits. --- video/out/gl_common.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'video') diff --git a/video/out/gl_common.c b/video/out/gl_common.c index b8e5efbb6a..4ed76caeeb 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -140,23 +140,6 @@ static bool is_software_gl(GL *gl) strcmp(renderer, "Mesa X11") == 0; } -#if HAVE_LIBDL -#include -#endif - -static void *mp_getdladdr(const char *s) -{ - void *ret = NULL; -#if HAVE_LIBDL - void *handle = dlopen(NULL, RTLD_LAZY); - if (!handle) - return NULL; - ret = dlsym(handle, s); - dlclose(handle); -#endif - return ret; -} - #define FN_OFFS(name) offsetof(GL, name) #define DEF_FN(name) {FN_OFFS(name), {"gl" # name}} @@ -490,10 +473,7 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *), .extensions = talloc_strdup(gl, ext2 ? ext2 : ""), }; - if (!getProcAddress) - getProcAddress = (void *)mp_getdladdr; - - gl->GetString = getProcAddress("glGetString"); + gl->GetString = getProcAddress ? getProcAddress("glGetString") : NULL; if (!gl->GetString) { mp_err(log, "Can't load OpenGL functions.\n"); return; -- cgit v1.2.3