*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Aug 2004 13:49:22 +0000
changeset 945 d33645c36072
parent 944 cdea7cbc3e23
child 946 8520712f8ef0
*** empty log message ***
test/graywin.c
--- a/test/graywin.c	Sat Aug 21 13:10:58 2004 +0000
+++ b/test/graywin.c	Sat Aug 21 13:49:22 2004 +0000
@@ -176,10 +176,13 @@
 		if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
 			videoflags |= SDL_NOFRAME;
 		} else
+		if ( argv[argc] && (strcmp(argv[argc], "-resize") == 0) ) {
+			videoflags |= SDL_RESIZABLE;
+		} else
 		if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
 			videoflags |= SDL_FULLSCREEN;
 		} else {
-			fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen]\n",
+			fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen] [-resize]\n",
 								argv[0]);
 			exit(1);
 		}
@@ -233,6 +236,18 @@
 			case SDL_VIDEOEXPOSE:
 				DrawBackground(screen);
 				break;
+			case SDL_VIDEORESIZE:
+					screen = CreateScreen(
+						event.resize.w, event.resize.h,
+						screen->format->BitsPerPixel,
+								videoflags);
+					if ( screen == NULL ) {
+						fprintf(stderr,
+					"Couldn't resize video mode\n");
+						done = 1;
+					}
+					DrawBackground(screen);
+				break;
 			default:
 				break;
 		}