Turn on blending if we're converting from a surface with colorkey enabled
authorSam Lantinga <slouken@libsdl.org>
Wed, 07 Jul 2010 21:35:44 -0700
changeset 4491 2cd7bb613a83
parent 4490 06c7423f8c60
child 4492 bff93336121e
Turn on blending if we're converting from a surface with colorkey enabled
src/video/SDL_surface.c
--- a/src/video/SDL_surface.c	Wed Jul 07 18:58:51 2010 -0700
+++ b/src/video/SDL_surface.c	Wed Jul 07 21:35:44 2010 -0700
@@ -851,7 +851,7 @@
     /* Enable alpha blending by default if the new surface has an
      * alpha channel or alpha modulation */
     if ((surface->format->Amask && format->Amask) ||
-        (copy_flags & SDL_COPY_MODULATE_ALPHA)) {
+        (copy_flags & (SDL_COPY_COLORKEY|SDL_COPY_MODULATE_ALPHA))) {
         SDL_SetSurfaceBlendMode(convert, SDL_BLENDMODE_BLEND);
     }
     if ((copy_flags & SDL_COPY_RLE_DESIRED) || (flags & SDL_RLEACCEL)) {