mirror of
https://github.com/yawut/SDL.git
synced 2026-09-14 12:06:26 -05:00
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!
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user