Commit 24ad689c authored by Sam Lantinga's avatar Sam Lantinga

Fixed a crash bug in checkkeys.c (thanks John!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40494
parent ae337cc4
...@@ -87,8 +87,14 @@ int main(int argc, char *argv[]) ...@@ -87,8 +87,14 @@ int main(int argc, char *argv[])
atexit(SDL_Quit); atexit(SDL_Quit);
videoflags = SDL_SWSURFACE; videoflags = SDL_SWSURFACE;
if ( strcmp(argv[1], "-fullscreen") == 0 ) { while( argc > 1 ) {
--argc;
if ( argv[argc] && !strcmp(argv[argc], "-fullscreen") ) {
videoflags |= SDL_FULLSCREEN; videoflags |= SDL_FULLSCREEN;
} else {
fprintf(stderr, "Usage: %s [-fullscreen]\n", argv[0]);
exit(1);
}
} }
/* Set 640x480 video mode */ /* Set 640x480 video mode */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment