GRAPHICS: Fix blending with default transColor on 32-bpp surfaces

This commit is contained in:
Matthew Jimenez 2021-02-06 20:51:30 -06:00
parent 1e9b46e367
commit c9696cb36c

View File

@ -526,7 +526,7 @@ void transBlit(const Surface &src, const Common::Rect &srcRect, Surface &dest, c
// If we're dealing with a 32-bit source surface, we need to split up the RGB,
// since we'll want to find matching RGB pixels irrespective of the alpha
bool isTrans32 = src.format.bytesPerPixel == 4 && transColor != (uint32)-1;
bool isTrans32 = src.format.bytesPerPixel == 4 && transColor != (uint32)-1 && transColor > 0;
if (isTrans32) {
src.format.colorToRGB(transColor, rt1, gt1, bt1);
}