Don't try to create an OpenGL window if we can't load the OpenGL library.
This commit is contained in:
parent
75cb962de6
commit
debf91fba3
1 changed files with 3 additions and 1 deletions
|
@ -1168,7 +1168,9 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
|
|||
SDL_SetError("No OpenGL support in video driver");
|
||||
return NULL;
|
||||
}
|
||||
SDL_GL_LoadLibrary(NULL);
|
||||
if (SDL_GL_LoadLibrary(NULL) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
|
||||
window->magic = &_this->window_magic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue