Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
RLE: Don't trash alpha channel in copy_32().
Browse files Browse the repository at this point in the history
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 209ceb0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/video/SDL_RLEaccel.c
Expand Up @@ -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;
Expand Down

0 comments on commit 209ceb0

Please sign in to comment.