No need to close the window when going to fullscreen mode
authorPatrice Mandin <patmandin@gmail.com>
Fri, 08 Oct 2004 09:08:32 +0000
changeset 95951ec8fc8bedb
parent 958 d390f9bd6b1c
child 960 eec28a5278be
No need to close the window when going to fullscreen mode
src/video/gem/SDL_gemvideo.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Fri Sep 17 13:47:44 2004 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Fri Oct 08 09:08:32 2004 +0000
     1.3 @@ -627,11 +627,6 @@
     1.4  	}
     1.5  
     1.6  	if (flags & SDL_FULLSCREEN) {
     1.7 -		/* Close window if needed */
     1.8 -		if (GEM_handle >= 0) {
     1.9 -			wind_close(GEM_handle);
    1.10 -		}
    1.11 -
    1.12  		GEM_LockScreen(this);
    1.13  
    1.14  		GEM_ClearScreen(this);
    1.15 @@ -665,9 +660,7 @@
    1.16  		modeflags |= SDL_SWSURFACE;
    1.17  
    1.18  		/* Recreate window ? only for different widget or non-created window */
    1.19 -		if ((old_win_type == GEM_win_type) && (GEM_handle >= 0)) {
    1.20 -			wind_get(GEM_handle, WF_CURRXYWH, &x2,&y2,&w2,&h2);
    1.21 -		} else {
    1.22 +		if ((old_win_type != GEM_win_type) || (GEM_handle < 0)) {
    1.23  			/* Calculate window size */
    1.24  			if (!wind_calc(WC_BORDER, GEM_win_type, 0,0,width,height, &x2,&y2,&w2,&h2)) {
    1.25  				GEM_FreeBuffers(this);
    1.26 @@ -700,10 +693,10 @@
    1.27  			/* Setup window name */
    1.28  			wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
    1.29  			GEM_refresh_name = SDL_FALSE;
    1.30 +
    1.31 +			/* Open the window */
    1.32 +			wind_open(GEM_handle,x2,y2,w2,h2);
    1.33  		}
    1.34 -	
    1.35 -		/* Open the window */
    1.36 -		wind_open(GEM_handle,x2,y2,w2,h2);
    1.37  
    1.38  		GEM_fullscreen = SDL_FALSE;
    1.39  	}