Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

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!
  • Loading branch information
icculus committed Aug 22, 2011
1 parent b0c8def commit 209ceb05bacc3f38c467b8df2e677954e0071189
Showing with 2 additions and 3 deletions.
  1. +2 −3 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);
return n * 4;

0 comments on commit 209ceb0

Please sign in to comment.