src/video/gem/SDL_gemvideo.c
changeset 964 d9209754ebee
parent 959 51ec8fc8bedb
child 984 44fd54a0ae5f
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Sun Oct 31 13:15:33 2004 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Sat Nov 06 08:56:23 2004 +0000
     1.3 @@ -401,6 +401,7 @@
     1.4  	GEM_locked = SDL_FALSE;
     1.5  	GEM_win_fulled = SDL_FALSE;
     1.6  	GEM_fullscreen = SDL_FALSE;
     1.7 +	GEM_lock_redraw = SDL_TRUE;	/* Prevent redraw till buffers are setup */
     1.8  
     1.9  	VDI_screen = NULL;
    1.10  	VDI_pitch = VDI_w * VDI_pixelsize;
    1.11 @@ -720,6 +721,7 @@
    1.12  #endif
    1.13  
    1.14  	this->UpdateRects = GEM_UpdateRects;
    1.15 +	GEM_lock_redraw = SDL_FALSE;	/* Enable redraw */
    1.16  
    1.17  	/* We're done */
    1.18  	return(current);
    1.19 @@ -858,6 +860,10 @@
    1.20  {
    1.21  	SDL_Surface *surface;
    1.22  
    1.23 +	if (GEM_lock_redraw) {
    1.24 +		return;
    1.25 +	}
    1.26 +
    1.27  	surface = this->screen;
    1.28  
    1.29  	if (surface->flags & SDL_FULLSCREEN) {
    1.30 @@ -951,6 +957,10 @@
    1.31  
    1.32  static int GEM_FlipHWSurface(_THIS, SDL_Surface *surface)
    1.33  {
    1.34 +	if (GEM_lock_redraw) {
    1.35 +		return(0);
    1.36 +	}
    1.37 +
    1.38  	if (surface->flags & SDL_FULLSCREEN) {
    1.39  		return GEM_FlipHWSurfaceFullscreen(this, surface);
    1.40  	} else {