From 209ceb05bacc3f38c467b8df2e677954e0071189 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 22 Aug 2011 13:34:58 -0400 Subject: [PATCH] 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index 3cf01d935..562341d0f 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -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;