Commit 747072f8 authored by Ryan C. Gordon's avatar Ryan C. Gordon

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!
parent 08f49bd2
......@@ -984,10 +984,9 @@ copy_32(void *dst, Uint32 * src, int n,
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment