Skip to content

Commit

Permalink
Date: Wed, 28 Jan 2004 20:25:54 +0100
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Jan 28, 2004
1 parent b4d08c9 commit e31d06a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/directfb/SDL_DirectFB_video.c
Expand Up @@ -250,7 +250,7 @@ static DFBSurfacePixelFormat SDLToDFBPixelFormat (SDL_PixelFormat *format)
if (format->Rmask == 0x7C00 &&
format->Gmask == 0x03E0 &&
format->Bmask == 0x001F)
return DSPF_RGB15;
return DSPF_ARGB1555;
break;

case 24:
Expand Down Expand Up @@ -280,7 +280,7 @@ static DFBSurfacePixelFormat SDLToDFBPixelFormat (SDL_PixelFormat *format)
case 8:
return DSPF_LUT8;
case 15:
return DSPF_RGB15;
return DSPF_ARGB1555;
case 16:
return DSPF_RGB16;
case 24:
Expand Down Expand Up @@ -329,7 +329,7 @@ static int DFBToSDLPixelFormat (DFBSurfacePixelFormat pixelformat, SDL_PixelForm
format->Amask = 0x000000FF;
break;

case DSPF_RGB15:
case DSPF_ARGB1555:
format->Rmask = 0x00007C00;
format->Gmask = 0x000003E0;
format->Bmask = 0x0000001F;
Expand Down

0 comments on commit e31d06a

Please sign in to comment.