Make error message meaningful if dlopen() fails on libX11.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401249
This commit is contained in:
parent
3eebcae2d9
commit
a216fe3cc6
1 changed files with 8 additions and 4 deletions
|
@ -466,15 +466,19 @@ int X11_GL_LoadLibrary(_THIS, const char* path)
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue