Fixed bug 2639 - SDL_BLENDMODE_BLEND not working properly for software renderer, thanks to Melker Narikka
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Jul 2014 16:21:56 -0700
changeset 9007515be38f3f37
parent 9006 98c808d72e20
child 9008 f061a86fbb08
Fixed bug 2639 - SDL_BLENDMODE_BLEND not working properly for software renderer, thanks to Melker Narikka
src/render/software/SDL_draw.h
     1.1 --- a/src/render/software/SDL_draw.h	Sat Jul 12 13:05:41 2014 -0700
     1.2 +++ b/src/render/software/SDL_draw.h	Sat Jul 12 16:21:56 2014 -0700
     1.3 @@ -51,11 +51,12 @@
     1.4  
     1.5  #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \
     1.6  do { \
     1.7 -    unsigned sr, sg, sb, sa; (void) sa; \
     1.8 +    unsigned sr, sg, sb, sa; \
     1.9      getpixel; \
    1.10      sr = DRAW_MUL(inva, sr) + r; \
    1.11      sg = DRAW_MUL(inva, sg) + g; \
    1.12      sb = DRAW_MUL(inva, sb) + b; \
    1.13 +    sa = DRAW_MUL(inva, sa) + a; \
    1.14      setpixel; \
    1.15  } while (0)
    1.16