*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Aug 2004 13:49:22 +0000
changeset 945d33645c36072
parent 944 cdea7cbc3e23
child 946 8520712f8ef0
*** empty log message ***
test/graywin.c
     1.1 --- a/test/graywin.c	Sat Aug 21 13:10:58 2004 +0000
     1.2 +++ b/test/graywin.c	Sat Aug 21 13:49:22 2004 +0000
     1.3 @@ -176,10 +176,13 @@
     1.4  		if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
     1.5  			videoflags |= SDL_NOFRAME;
     1.6  		} else
     1.7 +		if ( argv[argc] && (strcmp(argv[argc], "-resize") == 0) ) {
     1.8 +			videoflags |= SDL_RESIZABLE;
     1.9 +		} else
    1.10  		if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
    1.11  			videoflags |= SDL_FULLSCREEN;
    1.12  		} else {
    1.13 -			fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen]\n",
    1.14 +			fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen] [-resize]\n",
    1.15  								argv[0]);
    1.16  			exit(1);
    1.17  		}
    1.18 @@ -233,6 +236,18 @@
    1.19  			case SDL_VIDEOEXPOSE:
    1.20  				DrawBackground(screen);
    1.21  				break;
    1.22 +			case SDL_VIDEORESIZE:
    1.23 +					screen = CreateScreen(
    1.24 +						event.resize.w, event.resize.h,
    1.25 +						screen->format->BitsPerPixel,
    1.26 +								videoflags);
    1.27 +					if ( screen == NULL ) {
    1.28 +						fprintf(stderr,
    1.29 +					"Couldn't resize video mode\n");
    1.30 +						done = 1;
    1.31 +					}
    1.32 +					DrawBackground(screen);
    1.33 +				break;
    1.34  			default:
    1.35  				break;
    1.36  		}