Skip to content
Permalink
Browse files

Wrong RGB24 to RGB16 conversion

  • Loading branch information
pmandin committed Dec 2, 2004
1 parent fe0142a commit 91a849278fd2c2777e95ae4882dacd9ff26b7ab5
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/video/ataricommon/SDL_atarigl.c
@@ -711,8 +711,8 @@ static void CopyShadowRGBTo555(_THIS, SDL_Surface *surface)
for (x=0; x<surface->w; x++) {
Uint16 dstcolor;

dstcolor = ((*srccol++)>>9) & (31<<10);
dstcolor |= ((*srccol++)>>6) & (31<<5);
dstcolor = ((*srccol++)<<7) & (31<<10);
dstcolor |= ((*srccol++)<<2) & (31<<5);
dstcolor |= ((*srccol++)>>3) & 31;
*dstcol++ = dstcolor;
}
@@ -740,8 +740,8 @@ static void CopyShadowRGBTo565(_THIS, SDL_Surface *surface)
for (x=0; x<surface->w; x++) {
Uint16 dstcolor;

dstcolor = ((*srccol++)>>8) & (31<<11);
dstcolor |= ((*srccol++)>>5) & (63<<5);
dstcolor = ((*srccol++)<<8) & (31<<11);
dstcolor |= ((*srccol++)<<3) & (63<<5);
dstcolor |= ((*srccol++)>>3) & 31;
*dstcol++ = dstcolor;
}

0 comments on commit 91a8492

Please sign in to comment.