diff src/video/SDL_video.c @ 1928:861bc36f0ab3

Fixed crash with multiple windows
author Sam Lantinga <slouken@libsdl.org>
date Sun, 23 Jul 2006 00:19:12 +0000
parents 307355678142
children 9483df98e011
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sat Jul 22 23:04:41 2006 +0000
+++ b/src/video/SDL_video.c	Sun Jul 23 00:19:12 2006 +0000
@@ -843,16 +843,16 @@
 }
 
 int
-SDL_RecreateWindow(SDL_Window * window)
+SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
 {
-    if ((window->flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
-        window->flags &= ~SDL_WINDOW_OPENGL;
+    if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
         SDL_SetError("No OpenGL support in video driver");
         return -1;
     }
     if (_this->DestroyWindow) {
         _this->DestroyWindow(_this, window);
     }
+    window->flags = flags;
     return _this->CreateWindow(_this, window);
 }