test/checkkeys.c
changeset 493 806fcbde0af3
parent 473 30466f501b77
child 1151 be9c9c8f6d53
     1.1 --- a/test/checkkeys.c	Mon Sep 16 06:17:34 2002 +0000
     1.2 +++ b/test/checkkeys.c	Mon Sep 16 06:21:23 2002 +0000
     1.3 @@ -87,8 +87,14 @@
     1.4  	atexit(SDL_Quit);
     1.5  
     1.6  	videoflags = SDL_SWSURFACE;
     1.7 -	if ( strcmp(argv[1], "-fullscreen") == 0 ) {
     1.8 -		videoflags |= SDL_FULLSCREEN;
     1.9 +	while( argc > 1 ) {
    1.10 +		--argc;
    1.11 +		if ( argv[argc] && !strcmp(argv[argc], "-fullscreen") ) {
    1.12 +			videoflags |= SDL_FULLSCREEN;
    1.13 +		} else {
    1.14 +			fprintf(stderr, "Usage: %s [-fullscreen]\n", argv[0]);
    1.15 +			exit(1);
    1.16 +		}
    1.17  	}
    1.18  
    1.19  	/* Set 640x480 video mode */