comparison test/testoverlay.c @ 603:2e726be3dc08

From: Jonathan Atkins Subject: testoverlay... here's a fun one: ./testoverlay -scale -h it seems to print argv[optind-1] as the program name...
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 Mar 2003 05:57:29 +0000
parents e8063c656626
children 6399f4e90211
comparison
equal deleted inserted replaced
602:a24bd700f92e 603:2e726be3dc08
313 fprintf(stderr, " -fullscreen (test overlay in fullscreen mode)\n"); 313 fprintf(stderr, " -fullscreen (test overlay in fullscreen mode)\n");
314 } 314 }
315 315
316 int main(int argc, char **argv) 316 int main(int argc, char **argv)
317 { 317 {
318 char *argv0 = argv[0];
318 int flip; 319 int flip;
319 int delay; 320 int delay;
320 int desired_bpp; 321 int desired_bpp;
321 Uint32 video_flags, overlay_format; 322 Uint32 video_flags, overlay_format;
322 char *bmpfile; 323 char *bmpfile;
435 monochrome = 1; 436 monochrome = 1;
436 argv += 1; 437 argv += 1;
437 argc -= 1; 438 argc -= 1;
438 } else 439 } else
439 if (( strcmp(argv[1], "-help") == 0 ) || (strcmp(argv[1], "-h") == 0)) { 440 if (( strcmp(argv[1], "-help") == 0 ) || (strcmp(argv[1], "-h") == 0)) {
440 PrintUsage(argv[0]); 441 PrintUsage(argv0);
441 exit(1); 442 exit(1);
442 } else 443 } else
443 if ( strcmp(argv[1], "-fullscreen") == 0 ) { 444 if ( strcmp(argv[1], "-fullscreen") == 0 ) {
444 video_flags |= SDL_FULLSCREEN; 445 video_flags |= SDL_FULLSCREEN;
445 argv += 1; 446 argv += 1;