Mercurial > sdl-ios-xcode
diff src/video/gem/SDL_gemvideo.c @ 964:d9209754ebee
Prevent redraws till internal buffers are correctly setup
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 06 Nov 2004 08:56:23 +0000 |
parents | 51ec8fc8bedb |
children | 44fd54a0ae5f |
line wrap: on
line diff
--- a/src/video/gem/SDL_gemvideo.c Sun Oct 31 13:15:33 2004 +0000 +++ b/src/video/gem/SDL_gemvideo.c Sat Nov 06 08:56:23 2004 +0000 @@ -401,6 +401,7 @@ GEM_locked = SDL_FALSE; GEM_win_fulled = SDL_FALSE; GEM_fullscreen = SDL_FALSE; + GEM_lock_redraw = SDL_TRUE; /* Prevent redraw till buffers are setup */ VDI_screen = NULL; VDI_pitch = VDI_w * VDI_pixelsize; @@ -720,6 +721,7 @@ #endif this->UpdateRects = GEM_UpdateRects; + GEM_lock_redraw = SDL_FALSE; /* Enable redraw */ /* We're done */ return(current); @@ -858,6 +860,10 @@ { SDL_Surface *surface; + if (GEM_lock_redraw) { + return; + } + surface = this->screen; if (surface->flags & SDL_FULLSCREEN) { @@ -951,6 +957,10 @@ static int GEM_FlipHWSurface(_THIS, SDL_Surface *surface) { + if (GEM_lock_redraw) { + return(0); + } + if (surface->flags & SDL_FULLSCREEN) { return GEM_FlipHWSurfaceFullscreen(this, surface); } else {