Wrong RGB24 to RGB16 conversion
authorPatrice Mandin <patmandin@gmail.com>
Thu, 02 Dec 2004 23:00:28 +0000
changeset 1003 ece5ab8acd1c
parent 1002 13aa96c76e86
child 1004 d1cd674b2ecd
Wrong RGB24 to RGB16 conversion
src/video/ataricommon/SDL_atarigl.c
--- a/src/video/ataricommon/SDL_atarigl.c	Thu Dec 02 13:45:29 2004 +0000
+++ b/src/video/ataricommon/SDL_atarigl.c	Thu Dec 02 23:00:28 2004 +0000
@@ -711,8 +711,8 @@
 		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 @@
 		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;
 		}