mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 21:00:39 +00:00
GRAPHICS: Explicitly handle matching formats in ManagedSurface::simpleBlitFrom
This commit is contained in:
parent
04137b4d21
commit
a8221621e6
@ -396,9 +396,17 @@ void ManagedSurface::simpleBlitFromInner(const Surface &src, const Common::Rect
|
||||
const byte *srcPtr = (const byte *)src.getBasePtr(srcRectC.left, srcRectC.top);
|
||||
byte *dstPtr = (byte *)getBasePtr(dstRectC.left, dstRectC.top);
|
||||
|
||||
if (src.format.isCLUT8()) {
|
||||
if (format == src.format) {
|
||||
if (transparentColorSet) {
|
||||
keyBlit(dstPtr, srcPtr, pitch, src.pitch, srcRectC.width(), srcRectC.height(),
|
||||
format.bytesPerPixel, transparentColor);
|
||||
} else {
|
||||
copyBlit(dstPtr, srcPtr, pitch, src.pitch, srcRectC.width(), srcRectC.height(),
|
||||
format.bytesPerPixel);
|
||||
}
|
||||
} else if (src.format.isCLUT8()) {
|
||||
assert(srcPalette);
|
||||
assert(format.isCLUT8());
|
||||
assert(!format.isCLUT8());
|
||||
|
||||
uint32 map[256];
|
||||
convertPaletteToMap(map, srcPalette->data(), srcPalette->size(), format);
|
||||
|
Loading…
Reference in New Issue
Block a user