Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11gl.c @ 1246:ca51a76a7328
Make error message meaningful if dlopen() fails on libX11.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 13 Jan 2006 02:32:07 +0000 |
parents | b81f54c3963f |
children | ff73ee89ff4b |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gl.c Fri Jan 13 01:30:21 2006 +0000 +++ b/src/video/x11/SDL_x11gl.c Fri Jan 13 02:32:07 2006 +0000 @@ -466,15 +466,19 @@ int dlopen_flags = RTLD_LAZY; #endif handle = dlopen(path, dlopen_flags); + if ( handle == NULL ) { + SDL_SetError("Could not load OpenGL library: %s", (const char *) dlerror()); + return -1; + } } #else handle = SDL_LoadObject(path); + if ( handle == NULL ) { + SDL_SetError("Could not load OpenGL library"); + return -1; + } #endif - if ( handle == NULL ) { - SDL_SetError("Could not load OpenGL library"); - return -1; - } /* Unload the old driver and reset the pointers */ X11_GL_UnloadLibrary(this);