diff test/checkkeys.c @ 473:30466f501b77

Added a -fullscreen flag
author Sam Lantinga <slouken@libsdl.org>
date Sun, 25 Aug 2002 18:59:11 +0000
parents 74212992fb08
children 806fcbde0af3
line wrap: on
line diff
--- a/test/checkkeys.c	Sun Aug 25 16:25:37 2002 +0000
+++ b/test/checkkeys.c	Sun Aug 25 18:59:11 2002 +0000
@@ -77,6 +77,7 @@
 {
 	SDL_Event event;
 	int done;
+	Uint32 videoflags;
 
 	/* Initialize SDL */
 	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
@@ -85,8 +86,13 @@
 	}
 	atexit(SDL_Quit);
 
+	videoflags = SDL_SWSURFACE;
+	if ( strcmp(argv[1], "-fullscreen") == 0 ) {
+		videoflags |= SDL_FULLSCREEN;
+	}
+
 	/* Set 640x480 video mode */
-	if ( SDL_SetVideoMode(640, 480, 0, SDL_SWSURFACE) == NULL ) {
+	if ( SDL_SetVideoMode(640, 480, 0, videoflags) == NULL ) {
 		fprintf(stderr, "Couldn't set 640x480 video mode: %s\n",
 							SDL_GetError());
 		exit(2);