atari:gem: And always add 16 to the width asked by application, when creating or resizing window SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sat, 30 Sep 2017 23:54:30 +0200
branchSDL-1.2
changeset 115627b445007c968
parent 11561 e990d334b75a
child 11564 eb391d3461f1
atari:gem: And always add 16 to the width asked by application, when creating or resizing window
src/video/gem/SDL_gemvideo.c
     1.1 --- a/src/video/gem/SDL_gemvideo.c	Sat Sep 30 23:40:38 2017 +0200
     1.2 +++ b/src/video/gem/SDL_gemvideo.c	Sat Sep 30 23:54:30 2017 +0200
     1.3 @@ -740,7 +740,7 @@
     1.4  		/* Recreate window ? only for different widget or non-created window */
     1.5  		if ((old_win_type != GEM_win_type) || (GEM_handle < 0)) {
     1.6  			/* Calculate window size */
     1.7 -			if (!wind_calc(WC_BORDER, GEM_win_type, 0,0,width,height, &x2,&y2,&w2,&h2)) {
     1.8 +			if (!wind_calc(WC_BORDER, GEM_win_type, 0,0,width+16,height, &x2,&y2,&w2,&h2)) {
     1.9  				GEM_FreeBuffers(this);
    1.10  				SDL_SetError("Can not calculate window attributes");
    1.11  				return NULL;
    1.12 @@ -762,7 +762,6 @@
    1.13  			wind_calc(WC_WORK, GEM_win_type, x2,y2,w2,h2, &x2,&y2,&w2,&h2);
    1.14  			x2 &= -16;
    1.15  			x2 -= 8;
    1.16 -			w2 += 16;
    1.17  			wind_calc(WC_BORDER, GEM_win_type, x2,y2,w2,h2, &x2,&y2,&w2,&h2);
    1.18  
    1.19  			/* Destroy existing window */
    1.20 @@ -795,7 +794,7 @@
    1.21  		} else {
    1.22  			/* Resize window to fit asked video mode */
    1.23  			wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
    1.24 -			if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
    1.25 +			if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width+16,height, &x2,&y2,&w2,&h2)) {
    1.26  				wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
    1.27  			}
    1.28  		}