mirror of
https://github.com/yawut/SDL.git
synced 2026-07-09 05:05:26 -05:00
Don't try to create an OpenGL window if we can't load the OpenGL library.
This commit is contained in:
parent
35feaaaf51
commit
60fb545fec
|
|
@ -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…
Reference in New Issue
Block a user