test/common.c
changeset 2179 8b76cc268771
parent 2174 8f37b91f2e3e
child 2185 2032348afed1
equal deleted inserted replaced
2178:114a541cfae2 2179:8b76cc268771
   243     if (SDL_strcasecmp(argv[index], "--channels") == 0) {
   243     if (SDL_strcasecmp(argv[index], "--channels") == 0) {
   244         ++index;
   244         ++index;
   245         if (!argv[index]) {
   245         if (!argv[index]) {
   246             return -1;
   246             return -1;
   247         }
   247         }
   248         state->audiospec.channels = SDL_atoi(argv[index]);
   248         state->audiospec.channels = (Uint8)SDL_atoi(argv[index]);
   249         return 2;
   249         return 2;
   250     }
   250     }
   251     if (SDL_strcasecmp(argv[index], "--samples") == 0) {
   251     if (SDL_strcasecmp(argv[index], "--samples") == 0) {
   252         ++index;
   252         ++index;
   253         if (!argv[index]) {
   253         if (!argv[index]) {
   254             return -1;
   254             return -1;
   255         }
   255         }
   256         state->audiospec.samples = SDL_atoi(argv[index]);
   256         state->audiospec.samples = (Uint16)SDL_atoi(argv[index]);
   257         return 2;
   257         return 2;
   258     }
   258     }
   259     if ((SDL_strcasecmp(argv[index], "-h") == 0)
   259     if ((SDL_strcasecmp(argv[index], "-h") == 0)
   260         || (SDL_strcasecmp(argv[index], "--help") == 0)) {
   260         || (SDL_strcasecmp(argv[index], "--help") == 0)) {
   261         /* Print the usage message */
   261         /* Print the usage message */
   496         }
   496         }
   497     }
   497     }
   498     fprintf(stderr, ")\n");
   498     fprintf(stderr, ")\n");
   499 
   499 
   500     fprintf(stderr, "    Texture formats (%d): ", info->num_texture_formats);
   500     fprintf(stderr, "    Texture formats (%d): ", info->num_texture_formats);
   501     for (i = 0; i < info->num_texture_formats; ++i) {
   501     for (i = 0; i < (int)info->num_texture_formats; ++i) {
   502         if (i > 0) {
   502         if (i > 0) {
   503             fprintf(stderr, ", ");
   503             fprintf(stderr, ", ");
   504         }
   504         }
   505         PrintPixelFormat(info->texture_formats[i]);
   505         PrintPixelFormat(info->texture_formats[i]);
   506     }
   506     }