src/video/SDL_blit_N.c
changeset 6295 a2c60beb6115
parent 6281 e46d6f4b469e
child 6304 9821f5c9b7bd
     1.1 --- a/src/video/SDL_blit_N.c	Mon Feb 20 20:46:30 2012 -0500
     1.2 +++ b/src/video/SDL_blit_N.c	Mon Feb 20 20:56:52 2012 -0500
     1.3 @@ -707,6 +707,8 @@
     1.4          while ((UNALIGNED_PTR(dst)) && (width)) {
     1.5              bits = *(src++);
     1.6              RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
     1.7 +            if(!srcfmt->Amask)
     1.8 +              a = srcfmt->alpha;
     1.9              *(dst++) = MAKE8888(dstfmt, r, g, b, a);
    1.10              width--;
    1.11          }
    1.12 @@ -734,6 +736,8 @@
    1.13          while (extrawidth) {
    1.14              bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
    1.15              RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
    1.16 +            if(!srcfmt->Amask)
    1.17 +              a = srcfmt->alpha;
    1.18              *(dst++) = MAKE8888(dstfmt, r, g, b, a);
    1.19              extrawidth--;
    1.20          }
    1.21 @@ -790,6 +794,8 @@
    1.22                        DST_CHAN_DEST);
    1.23              bits = *(src++);
    1.24              RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
    1.25 +            if(!srcfmt->Amask)
    1.26 +              a = srcfmt->alpha;
    1.27              *(dst++) = MAKE8888(dstfmt, r, g, b, a);
    1.28              width--;
    1.29          }
    1.30 @@ -821,6 +827,8 @@
    1.31          while (extrawidth) {
    1.32              bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
    1.33              RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
    1.34 +            if(!srcfmt->Amask)
    1.35 +              a = srcfmt->alpha;
    1.36              *(dst++) = MAKE8888(dstfmt, r, g, b, a);
    1.37              extrawidth--;
    1.38          }