comparison src/video/directfb/SDL_DirectFB_video.c @ 790:d39b74b8583c

Date: Wed, 28 Jan 2004 20:25:54 +0100 From: Thomas Jarosch Subject: Re: [SDL] DSPF_RBG15 in src/video/directfb/SDL_DirectFB_video.c In my local DirectFB 0.1.19 copy, DSPF_RGB15 is an alias for DSPF_ARGB1555. They seem to have it removed in DirectFB CVS. As DSPF_RGB15 was only an alias, the attached patch can safely be applied to SDL and won't brake older DirectFB versions.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 28 Jan 2004 22:01:02 +0000
parents b8d311d90021
children 7ac8ec80ea68
comparison
equal deleted inserted replaced
789:f9d0e03fc2ff 790:d39b74b8583c
248 248
249 case 15: 249 case 15:
250 if (format->Rmask == 0x7C00 && 250 if (format->Rmask == 0x7C00 &&
251 format->Gmask == 0x03E0 && 251 format->Gmask == 0x03E0 &&
252 format->Bmask == 0x001F) 252 format->Bmask == 0x001F)
253 return DSPF_RGB15; 253 return DSPF_ARGB1555;
254 break; 254 break;
255 255
256 case 24: 256 case 24:
257 if (format->Rmask == 0xFF0000 && 257 if (format->Rmask == 0xFF0000 &&
258 format->Gmask == 0x00FF00 && 258 format->Gmask == 0x00FF00 &&
278 switch (format->BitsPerPixel) 278 switch (format->BitsPerPixel)
279 { 279 {
280 case 8: 280 case 8:
281 return DSPF_LUT8; 281 return DSPF_LUT8;
282 case 15: 282 case 15:
283 return DSPF_RGB15; 283 return DSPF_ARGB1555;
284 case 16: 284 case 16:
285 return DSPF_RGB16; 285 return DSPF_RGB16;
286 case 24: 286 case 24:
287 return DSPF_RGB24; 287 return DSPF_RGB24;
288 case 32: 288 case 32:
327 { 327 {
328 case DSPF_A8: 328 case DSPF_A8:
329 format->Amask = 0x000000FF; 329 format->Amask = 0x000000FF;
330 break; 330 break;
331 331
332 case DSPF_RGB15: 332 case DSPF_ARGB1555:
333 format->Rmask = 0x00007C00; 333 format->Rmask = 0x00007C00;
334 format->Gmask = 0x000003E0; 334 format->Gmask = 0x000003E0;
335 format->Bmask = 0x0000001F; 335 format->Bmask = 0x0000001F;
336 break; 336 break;
337 337