changeset 4491:2cd7bb613a83

Turn on blending if we're converting from a surface with colorkey enabled
author Sam Lantinga <slouken@libsdl.org>
date Wed, 07 Jul 2010 21:35:44 -0700
parents 06c7423f8c60
children bff93336121e
files src/video/SDL_surface.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)) {