Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #963 (Crash with OpenGL & window resizing)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Feb 16, 2011
1 parent 7f77911 commit dd0ba89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SDL_compat.c
Expand Up @@ -558,6 +558,8 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
surface_flags |= SDL_NOFRAME;
}

SDL_VideoFlags = flags;

/* If we're in OpenGL mode, just create a stub surface and we're done! */
if (flags & SDL_OPENGL) {
SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
Expand Down Expand Up @@ -627,8 +629,6 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
SDL_PublicSurface =
(SDL_ShadowSurface ? SDL_ShadowSurface : SDL_VideoSurface);

SDL_VideoFlags = flags;

ClearVideoSurface();

SetupScreenSaver(flags);
Expand Down

0 comments on commit dd0ba89

Please sign in to comment.