Fixed crash if the rendering system couldn't create an OpenGL window.
This commit is contained in:
parent
5b2a5e3412
commit
6261562fa0
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue