Fixed a crash bug in checkkeys.c (thanks John!)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40494
This commit is contained in:
parent
ae337cc4b4
commit
24ad689c20
1 changed files with 8 additions and 2 deletions
|
@ -87,8 +87,14 @@ int main(int argc, char *argv[])
|
|||
atexit(SDL_Quit);
|
||||
|
||||
videoflags = SDL_SWSURFACE;
|
||||
if ( strcmp(argv[1], "-fullscreen") == 0 ) {
|
||||
videoflags |= SDL_FULLSCREEN;
|
||||
while( argc > 1 ) {
|
||||
--argc;
|
||||
if ( argv[argc] && !strcmp(argv[argc], "-fullscreen") ) {
|
||||
videoflags |= SDL_FULLSCREEN;
|
||||
} else {
|
||||
fprintf(stderr, "Usage: %s [-fullscreen]\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set 640x480 video mode */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue