comparison test/common.c @ 2185:2032348afed1

This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is available and to keep people form having to install yet another library I have added the essential parts of Xmu in src/video/extensions/XmuStdCmap and an include file in src/video/extensions. The support makes use of standard X11 mechanisms to create color maps and make sure that an application uses the same color map for each window/visual combination. This should make it possible for gamma support to be implemented based on a single color map per application. Hurm... it looks like "make indent" modified a few extra files. Those are getting committed too.
author Bob Pendleton <bob@pendleton.com>
date Thu, 12 Jul 2007 20:00:50 +0000
parents 8b76cc268771
children b292fa4941c6
comparison
equal deleted inserted replaced
2184:8f8516e79a13 2185:2032348afed1
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 = (Uint8)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 = (Uint16)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 < (int)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 }