diff --git a/graphics/managed_surface.cpp b/graphics/managed_surface.cpp index 93c0c0312b6..d5d7f614c4a 100644 --- a/graphics/managed_surface.cpp +++ b/graphics/managed_surface.cpp @@ -244,8 +244,7 @@ void ManagedSurface::blitFromInner(const Surface &src, const Common::Rect &srcRe for (int x = 0; x < srcBounds.width(); ++x, srcP += src.format.bytesPerPixel, destP += format.bytesPerPixel) { - src.format.colorToARGB(src.format.bytesPerPixel == 2 ? *(const uint16 *)srcP : *(const uint32 *)srcP, - aSrc, rSrc, gSrc, bSrc); + if (src.format.bytesPerPixel == 1) { // Get the palette color const uint32 col = palette[*srcP]; @@ -255,8 +254,9 @@ void ManagedSurface::blitFromInner(const Surface &src, const Common::Rect &srcRe aSrc = (col >> 24) & 0xff; } else { // Use the src's pixel format to split up the source pixel - format.colorToRGB(format.bytesPerPixel == 2 ? *(const uint16 *)destP : *(const uint32 *)destP, - rDest, gDest, bDest); + src.format.colorToARGB(src.format.bytesPerPixel == 2 + ? *(const uint16 *)srcP : *(const uint32 *)srcP, + aSrc, rSrc, gSrc, bSrc); } if (aSrc == 0) {