Commit 22664488 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #963 (Crash with OpenGL & window resizing)

The crash was already fixed, but the window doesn't need to be recreated if you're just changing the size of the OpenGL window.
parent 1eebb755
...@@ -558,6 +558,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) ...@@ -558,6 +558,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
surface_flags |= SDL_NOFRAME; surface_flags |= SDL_NOFRAME;
} }
SDL_VideoFlags = flags;
/* If we're in OpenGL mode, just create a stub surface and we're done! */ /* If we're in OpenGL mode, just create a stub surface and we're done! */
if (flags & SDL_OPENGL) { if (flags & SDL_OPENGL) {
SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
...@@ -627,8 +629,6 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) ...@@ -627,8 +629,6 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
SDL_PublicSurface = SDL_PublicSurface =
(SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface); (SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface);
SDL_VideoFlags = flags;
ClearVideoSurface(); ClearVideoSurface();
SetupScreenSaver(flags); SetupScreenSaver(flags);
......
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