Wrong RGB24 to RGB16 conversion
authorPatrice Mandin <patmandin@gmail.com>
Thu, 02 Dec 2004 23:00:28 +0000
changeset 1003ece5ab8acd1c
parent 1002 13aa96c76e86
child 1004 d1cd674b2ecd
Wrong RGB24 to RGB16 conversion
src/video/ataricommon/SDL_atarigl.c
     1.1 --- a/src/video/ataricommon/SDL_atarigl.c	Thu Dec 02 13:45:29 2004 +0000
     1.2 +++ b/src/video/ataricommon/SDL_atarigl.c	Thu Dec 02 23:00:28 2004 +0000
     1.3 @@ -711,8 +711,8 @@
     1.4  		for (x=0; x<surface->w; x++) {
     1.5  			Uint16 dstcolor;
     1.6  			
     1.7 -			dstcolor = ((*srccol++)>>9) & (31<<10);
     1.8 -			dstcolor |= ((*srccol++)>>6) & (31<<5);
     1.9 +			dstcolor = ((*srccol++)<<7) & (31<<10);
    1.10 +			dstcolor |= ((*srccol++)<<2) & (31<<5);
    1.11  			dstcolor |= ((*srccol++)>>3) & 31;
    1.12  			*dstcol++ = dstcolor;
    1.13  		}
    1.14 @@ -740,8 +740,8 @@
    1.15  		for (x=0; x<surface->w; x++) {
    1.16  			Uint16 dstcolor;
    1.17  			
    1.18 -			dstcolor = ((*srccol++)>>8) & (31<<11);
    1.19 -			dstcolor |= ((*srccol++)>>5) & (63<<5);
    1.20 +			dstcolor = ((*srccol++)<<8) & (31<<11);
    1.21 +			dstcolor |= ((*srccol++)<<3) & (63<<5);
    1.22  			dstcolor |= ((*srccol++)>>3) & 31;
    1.23  			*dstcol++ = dstcolor;
    1.24  		}