Turn on blending if we're converting from a surface with colorkey enabled

This commit is contained in:
Sam Lantinga 2010-07-07 21:35:44 -07:00
parent 99b869fe2e
commit 987085b1ee

View file

@ -851,7 +851,7 @@ SDL_ConvertSurface(SDL_Surface * surface, SDL_PixelFormat * format,
/* Enable alpha blending by default if the new surface has an /* Enable alpha blending by default if the new surface has an
* alpha channel or alpha modulation */ * alpha channel or alpha modulation */
if ((surface->format->Amask && format->Amask) || 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); SDL_SetSurfaceBlendMode(convert, SDL_BLENDMODE_BLEND);
} }
if ((copy_flags & SDL_COPY_RLE_DESIRED) || (flags & SDL_RLEACCEL)) { if ((copy_flags & SDL_COPY_RLE_DESIRED) || (flags & SDL_RLEACCEL)) {