Simply resize existing window SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sat, 26 May 2007 20:09:56 +0000
branchSDL-1.2
changeset 3942b3b6f1a8d60a
parent 3941 2409c20399c1
child 3943 1d9cd0ff67cc
Simply resize existing window
src/video/gem/SDL_gemvideo.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Sat May 26 19:44:37 2007 +0000
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Sat May 26 20:09:56 2007 +0000
     1.3 @@ -778,17 +778,10 @@
     1.4  			/* Open the window */
     1.5  			wind_open(GEM_handle,x2,y2,w2,h2);
     1.6  		} else {
     1.7 -			/* Resize window if needed, to fit asked video mode */
     1.8 -			if (modeflags & SDL_RESIZABLE) {
     1.9 -				wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
    1.10 -				if ((w2&15)!=0) {
    1.11 -					w2=(w2|15)+1;
    1.12 -				}
    1.13 -				if ((w2!=width) || (h2!=height)) {
    1.14 -					if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
    1.15 -						wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
    1.16 -					}
    1.17 -				}
    1.18 +			/* Resize window to fit asked video mode */
    1.19 +			wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
    1.20 +			if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
    1.21 +				wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
    1.22  			}
    1.23  		}
    1.24