mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Don't crash if SDL_Flip() is called with an OpenGL mode set
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user