test/testoverlay2.c
changeset 886 05c551e5bc64
parent 753 b14fdadd8311
child 1030 6b8f0543337c
     1.1 --- a/test/testoverlay2.c	Fri Apr 30 18:33:30 2004 +0000
     1.2 +++ b/test/testoverlay2.c	Thu May 06 15:55:06 2004 +0000
     1.3 @@ -254,13 +254,15 @@
     1.4  static void PrintUsage(char *argv0)
     1.5  {
     1.6      fprintf(stderr, "Usage: %s [arg] [arg] [arg] ...\n", argv0);
     1.7 -    fprintf(stderr, "Where 'arg' is one of:\n");
     1.8 +    fprintf(stderr, "\n");
     1.9 +    fprintf(stderr, "Where 'arg' is any of the following options:\n");
    1.10 +    fprintf(stderr, "\n");
    1.11      fprintf(stderr, "	-fps <frames per second>\n");
    1.12      fprintf(stderr, "	-format <fmt> (one of the: YV12, IYUV, YUY2, UYVY, YVYU)\n");
    1.13      fprintf(stderr, "	-scale <scale factor> (initial scale of the overlay)\n");
    1.14      fprintf(stderr, "	-help (shows this help)\n");
    1.15      fprintf(stderr, "\n");
    1.16 -    fprintf(stderr, "	Press ESC to exit, or SPACE to freeze the movie while application running.\n");
    1.17 +    fprintf(stderr, "Press ESC to exit, or SPACE to freeze the movie while application running.\n");
    1.18      fprintf(stderr, "\n");
    1.19  }
    1.20  
    1.21 @@ -466,6 +468,11 @@
    1.22      free(RawMooseData);
    1.23  
    1.24      overlay=SDL_CreateYUVOverlay(MOOSEPIC_W, MOOSEPIC_H, overlay_format, screen);
    1.25 +    if (!overlay)
    1.26 +    {
    1.27 +        fprintf(stderr, "Couldn't create overlay: %s\n", SDL_GetError());
    1.28 +        return 7;
    1.29 +    }
    1.30  
    1.31      printf("Created %dx%dx%d %s %s overlay\n",overlay->w,overlay->h,overlay->planes,
    1.32             overlay->hw_overlay?"hardware":"software",