Fixed crash with multiple windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401973
This commit is contained in:
Sam Lantinga 2006-07-23 00:19:12 +00:00
parent e06b514882
commit 1d8a5a2349
3 changed files with 5 additions and 6 deletions

View file

@ -199,8 +199,7 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
GL_RenderData *data;
if (!(window->flags & SDL_WINDOW_OPENGL)) {
window->flags |= SDL_WINDOW_OPENGL;
if (SDL_RecreateWindow(window) < 0) {
if (SDL_RecreateWindow(window, window->flags | SDL_WINDOW_OPENGL) < 0) {
return NULL;
}
}