From ce798a8948509b08100c1f4e6e28e9087170de5f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 9 Mar 2006 16:12:34 +0000 Subject: [PATCH] Don't crash if SDL_Flip() is called with an OpenGL mode set --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401495 --- src/video/SDL_video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 2cf6b6c5c..a28a3e8fa 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1008,6 +1008,10 @@ void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects) SDL_VideoDevice *video = current_video; SDL_VideoDevice *this = current_video; + if ( (screen->flags & (SDL_OPENGL | SDL_OPENGLBLIT)) == SDL_OPENGL ) { + SDL_SetError("OpenGL active, use SDL_GL_SwapBuffers()"); + return; + } if ( screen == SDL_ShadowSurface ) { /* Blit the shadow surface using saved mapping */ SDL_Palette *pal = screen->format->palette;