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 9007 515be38f3f37
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
--- a/src/render/software/SDL_draw.h	Sat Jul 12 13:05:41 2014 -0700
+++ b/src/render/software/SDL_draw.h	Sat Jul 12 16:21:56 2014 -0700
@@ -51,11 +51,12 @@
 
 #define DRAW_SETPIXEL_BLEND(getpixel, setpixel) \
 do { \
-    unsigned sr, sg, sb, sa; (void) sa; \
+    unsigned sr, sg, sb, sa; \
     getpixel; \
     sr = DRAW_MUL(inva, sr) + r; \
     sg = DRAW_MUL(inva, sg) + g; \
     sb = DRAW_MUL(inva, sb) + b; \
+    sa = DRAW_MUL(inva, sa) + a; \
     setpixel; \
 } while (0)