Date: Wed, 28 Jan 2004 20:25:54 +0100
authorSam Lantinga
Wed, 28 Jan 2004 22:01:02 +0000
changeset 790d39b74b8583c
parent 789 f9d0e03fc2ff
child 791 ab0d977f91f8
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.
src/video/directfb/SDL_DirectFB_video.c
     1.1 --- a/src/video/directfb/SDL_DirectFB_video.c	Wed Jan 28 01:57:34 2004 +0000
     1.2 +++ b/src/video/directfb/SDL_DirectFB_video.c	Wed Jan 28 22:01:02 2004 +0000
     1.3 @@ -250,7 +250,7 @@
     1.4            if (format->Rmask == 0x7C00 &&
     1.5                format->Gmask == 0x03E0 &&
     1.6                format->Bmask == 0x001F)
     1.7 -            return DSPF_RGB15;
     1.8 +            return DSPF_ARGB1555;
     1.9            break;
    1.10            
    1.11          case 24:
    1.12 @@ -280,7 +280,7 @@
    1.13          case 8:
    1.14            return DSPF_LUT8;
    1.15  	case 15:
    1.16 -	  return DSPF_RGB15;
    1.17 +	  return DSPF_ARGB1555;
    1.18  	case 16:
    1.19  	  return DSPF_RGB16;
    1.20  	case 24:
    1.21 @@ -329,7 +329,7 @@
    1.22        format->Amask = 0x000000FF;
    1.23        break;
    1.24  
    1.25 -    case DSPF_RGB15:
    1.26 +    case DSPF_ARGB1555:
    1.27        format->Rmask = 0x00007C00;
    1.28        format->Gmask = 0x000003E0;
    1.29        format->Bmask = 0x0000001F;