More correct error reported when calling SDL_GL_LoadLibrary() without
prior call to SDL_Init(). --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40424
This commit is contained in:
parent
69c56b9025
commit
7aab656e69
1 changed files with 7 additions and 3 deletions
|
@ -1299,10 +1299,14 @@ int SDL_GL_LoadLibrary(const char *path)
|
|||
int retval;
|
||||
|
||||
retval = -1;
|
||||
if ( video && video->GL_LoadLibrary ) {
|
||||
retval = video->GL_LoadLibrary(this, path);
|
||||
if ( video == NULL ) {
|
||||
SDL_SetError("Video subsystem has not been initialized");
|
||||
} else {
|
||||
SDL_SetError("No dynamic GL support in video driver");
|
||||
if ( video->GL_LoadLibrary ) {
|
||||
retval = video->GL_LoadLibrary(this, path);
|
||||
} else {
|
||||
SDL_SetError("No dynamic GL support in video driver");
|
||||
}
|
||||
}
|
||||
return(retval);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue