From 93bed9ccce3eedb197c0fee0e2686c8ab908f5da Mon Sep 17 00:00:00 2001 From: "dmitry.gapkalov" Date: Mon, 23 Aug 2021 15:19:24 -0400 Subject: [PATCH] fix blend mode for converted surface with alpha --- src/video/SDL_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 9f1a2a161..89ba68bc7 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -1298,7 +1298,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, /* Enable alpha blending by default if the new surface has an * alpha channel or alpha modulation */ - if ((surface->format->Amask && format->Amask) || + if ((convert->format->Amask && format->Amask) || (palette_has_alpha && format->Amask) || (copy_flags & SDL_COPY_MODULATE_ALPHA)) { SDL_SetSurfaceBlendMode(convert, SDL_BLENDMODE_BLEND);