RLE: Don't trash alpha channel in copy_32().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 22 Aug 2011 13:34:58 -0400
changeset 5631 3e1cbc6d7cad
parent 5630 39e74dab5ebb
child 5632 f2aeea007e85
RLE: Don't trash alpha channel in copy_32(). It was being set to (mask|value) instead of (value). Thanks to li zhuo for the bug report!
src/video/SDL_RLEaccel.c
--- a/src/video/SDL_RLEaccel.c	Mon Aug 22 02:26:11 2011 -0400
+++ b/src/video/SDL_RLEaccel.c	Mon Aug 22 13:34:58 2011 -0400
@@ -984,10 +984,9 @@
     Uint32 *d = dst;
     for (i = 0; i < n; i++) {
         unsigned r, g, b, a;
-        Uint32 pixel;
         RGBA_FROM_8888(*src, sfmt, r, g, b, a);
-        PIXEL_FROM_RGB(pixel, dfmt, r, g, b);
-        *d++ = pixel | a << 24;
+        PIXEL_FROM_RGBA(*d, dfmt, r, g, b, a);
+        d++;
         src++;
     }
     return n * 4;