Commit 6261562f authored by Sam Lantinga's avatar Sam Lantinga

Fixed crash if the rendering system couldn't create an OpenGL window.

parent 5b2a5e34
......@@ -239,6 +239,8 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
window_flags = SDL_GetWindowFlags(window);
if (!(window_flags & SDL_WINDOW_OPENGL)) {
if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
/* Uh oh, better try to put it back... */
SDL_RecreateWindow(window, window_flags);
return NULL;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment