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

Commit

Permalink
Fixed bug 1638 - Blit Alpha surface bug
Browse files Browse the repository at this point in the history
The DUFFS_LOOP_124() macro was trying to be too clever and wasn't doing the right thing, it was checking n & 4 instead of width.
I'm not sure how we didn't catch this before, but it should be fixed now.
  • Loading branch information
slouken committed Aug 1, 2013
1 parent acd09b2 commit 3f46cc3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/video/SDL_blit.h
Expand Up @@ -510,13 +510,15 @@ do { \
if (n & 2) { \
pixel_copy_increment2; n -= 2; \
} \
if (n & 4) { \
pixel_copy_increment4; n -= 4; \
} \
if (n) { \
n = (n+7)/ 8; \
switch (n & 4) { \
case 0: do { pixel_copy_increment4; \
case 4: pixel_copy_increment4; \
} while (--n > 0); \
} \
n /= 8; \
do { \
pixel_copy_increment4; \
pixel_copy_increment4; \
} while (--n > 0); \
} \
}

Expand Down

0 comments on commit 3f46cc3

Please sign in to comment.