RLE: Don't trash alpha channel in copy_32().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 22 Aug 2011 13:34:58 -0400
changeset 56313e1cbc6d7cad
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
     1.1 --- a/src/video/SDL_RLEaccel.c	Mon Aug 22 02:26:11 2011 -0400
     1.2 +++ b/src/video/SDL_RLEaccel.c	Mon Aug 22 13:34:58 2011 -0400
     1.3 @@ -984,10 +984,9 @@
     1.4      Uint32 *d = dst;
     1.5      for (i = 0; i < n; i++) {
     1.6          unsigned r, g, b, a;
     1.7 -        Uint32 pixel;
     1.8          RGBA_FROM_8888(*src, sfmt, r, g, b, a);
     1.9 -        PIXEL_FROM_RGB(pixel, dfmt, r, g, b);
    1.10 -        *d++ = pixel | a << 24;
    1.11 +        PIXEL_FROM_RGBA(*d, dfmt, r, g, b, a);
    1.12 +        d++;
    1.13          src++;
    1.14      }
    1.15      return n * 4;