Added a -fullscreen flag
authorSam Lantinga <slouken@libsdl.org>
Sun, 25 Aug 2002 18:59:11 +0000
changeset 47330466f501b77
parent 472 34fb7043b18b
child 474 583a07ab5444
Added a -fullscreen flag
test/checkkeys.c
     1.1 --- a/test/checkkeys.c	Sun Aug 25 16:25:37 2002 +0000
     1.2 +++ b/test/checkkeys.c	Sun Aug 25 18:59:11 2002 +0000
     1.3 @@ -77,6 +77,7 @@
     1.4  {
     1.5  	SDL_Event event;
     1.6  	int done;
     1.7 +	Uint32 videoflags;
     1.8  
     1.9  	/* Initialize SDL */
    1.10  	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
    1.11 @@ -85,8 +86,13 @@
    1.12  	}
    1.13  	atexit(SDL_Quit);
    1.14  
    1.15 +	videoflags = SDL_SWSURFACE;
    1.16 +	if ( strcmp(argv[1], "-fullscreen") == 0 ) {
    1.17 +		videoflags |= SDL_FULLSCREEN;
    1.18 +	}
    1.19 +
    1.20  	/* Set 640x480 video mode */
    1.21 -	if ( SDL_SetVideoMode(640, 480, 0, SDL_SWSURFACE) == NULL ) {
    1.22 +	if ( SDL_SetVideoMode(640, 480, 0, videoflags) == NULL ) {
    1.23  		fprintf(stderr, "Couldn't set 640x480 video mode: %s\n",
    1.24  							SDL_GetError());
    1.25  		exit(2);