src/video/windx5/SDL_dx5video.c
changeset 1291 31331c444ea2
parent 1290 c4a5a772c5d9
child 1295 c3e36ac8a94c
     1.1 --- a/src/video/windx5/SDL_dx5video.c	Sun Jan 29 18:17:35 2006 +0000
     1.2 +++ b/src/video/windx5/SDL_dx5video.c	Sun Jan 29 22:09:26 2006 +0000
     1.3 @@ -1007,6 +1007,7 @@
     1.4  	LPDIRECTDRAWSURFACE  dd_surface1;
     1.5  	LPDIRECTDRAWSURFACE3 dd_surface3;
     1.6  
     1.7 +	SDL_resizing = 1;
     1.8  #ifdef DDRAW_DEBUG
     1.9   fprintf(stderr, "Setting %dx%dx%d video mode\n", width, height, bpp);
    1.10  #endif
    1.11 @@ -1157,7 +1158,6 @@
    1.12  			}
    1.13  			swp_flags = (SWP_NOCOPYBITS | SWP_SHOWWINDOW);
    1.14  
    1.15 -			SDL_resizing = 1;
    1.16  			bounds.left = SDL_windowX;
    1.17  			bounds.top = SDL_windowY;
    1.18  			bounds.right = SDL_windowX+video->w;
    1.19 @@ -1184,9 +1184,13 @@
    1.20  				top = HWND_NOTOPMOST;
    1.21  			}
    1.22  			SetWindowPos(SDL_Window, top, x, y, width, height, swp_flags);
    1.23 -			SDL_resizing = 0;
    1.24 +			if ( !(flags & SDL_FULLSCREEN) ) {
    1.25 +				SDL_windowX = SDL_bounds.left;
    1.26 +				SDL_windowY = SDL_bounds.top;
    1.27 +			}
    1.28  			SetForegroundWindow(SDL_Window);
    1.29  		}
    1.30 +		SDL_resizing = 0;
    1.31  
    1.32  		/* Set up for OpenGL */
    1.33  		if ( WIN_GL_SetupWindow(this) < 0 ) {
    1.34 @@ -1240,7 +1244,6 @@
    1.35  		int maxRefreshRate;
    1.36  
    1.37  		/* Cover up desktop during mode change */
    1.38 -		SDL_resizing = 1;
    1.39  		bounds.left = 0;
    1.40  		bounds.top = 0;
    1.41  		bounds.right = GetSystemMetrics(SM_CXSCREEN);
    1.42 @@ -1250,7 +1253,6 @@
    1.43  			bounds.left, bounds.top, 
    1.44  			bounds.right - bounds.left,
    1.45  			bounds.bottom - bounds.top, SWP_NOCOPYBITS);
    1.46 -		SDL_resizing = 0;
    1.47  		ShowWindow(SDL_Window, SW_SHOW);
    1.48  		while ( GetForegroundWindow() != SDL_Window ) {
    1.49  			SetForegroundWindow(SDL_Window);
    1.50 @@ -1559,7 +1561,6 @@
    1.51  			}
    1.52  			swp_flags = SWP_NOCOPYBITS;
    1.53  
    1.54 -			SDL_resizing = 1;
    1.55  			bounds.left = SDL_windowX;
    1.56  			bounds.top = SDL_windowY;
    1.57  			bounds.right = SDL_windowX+video->w;
    1.58 @@ -1578,12 +1579,14 @@
    1.59  				swp_flags |= SWP_NOMOVE;
    1.60  			}
    1.61  			SetWindowPos(SDL_Window, HWND_NOTOPMOST, x, y, width, height, swp_flags);
    1.62 -			SDL_resizing = 0;
    1.63 +			SDL_windowX = SDL_bounds.left;
    1.64 +			SDL_windowY = SDL_bounds.top;
    1.65  		}
    1.66  
    1.67  	}
    1.68  	ShowWindow(SDL_Window, SW_SHOW);
    1.69  	SetForegroundWindow(SDL_Window);
    1.70 +	SDL_resizing = 0;
    1.71  
    1.72  	/* We're live! */
    1.73  	return(video);