Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 1491:cf23b92602aa
Don't crash if SDL_Flip() is called with an OpenGL mode set
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 09 Mar 2006 16:12:34 +0000 |
parents | 5f52867ba65c |
children | 8d9bb0cf2c2a |
comparison
equal
deleted
inserted
replaced
1490:8f3e602904d1 | 1491:cf23b92602aa |
---|---|
1006 { | 1006 { |
1007 int i; | 1007 int i; |
1008 SDL_VideoDevice *video = current_video; | 1008 SDL_VideoDevice *video = current_video; |
1009 SDL_VideoDevice *this = current_video; | 1009 SDL_VideoDevice *this = current_video; |
1010 | 1010 |
1011 if ( (screen->flags & (SDL_OPENGL | SDL_OPENGLBLIT)) == SDL_OPENGL ) { | |
1012 SDL_SetError("OpenGL active, use SDL_GL_SwapBuffers()"); | |
1013 return; | |
1014 } | |
1011 if ( screen == SDL_ShadowSurface ) { | 1015 if ( screen == SDL_ShadowSurface ) { |
1012 /* Blit the shadow surface using saved mapping */ | 1016 /* Blit the shadow surface using saved mapping */ |
1013 SDL_Palette *pal = screen->format->palette; | 1017 SDL_Palette *pal = screen->format->palette; |
1014 SDL_Color *saved_colors = NULL; | 1018 SDL_Color *saved_colors = NULL; |
1015 if ( pal && !(SDL_VideoSurface->flags & SDL_HWPALETTE) ) { | 1019 if ( pal && !(SDL_VideoSurface->flags & SDL_HWPALETTE) ) { |