From 2ee0a6751d36cd93dff20ac76eecb21c32216200 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 25 Aug 2002 18:59:11 +0000 Subject: [PATCH] Added a -fullscreen flag --- test/checkkeys.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/checkkeys.c b/test/checkkeys.c index 582e78f3e..a44489f65 100644 --- a/test/checkkeys.c +++ b/test/checkkeys.c @@ -77,6 +77,7 @@ int main(int argc, char *argv[]) { SDL_Event event; int done; + Uint32 videoflags; /* Initialize SDL */ if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { @@ -85,8 +86,13 @@ int main(int argc, char *argv[]) } 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);