mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 01:05:59 +00:00
AGS: Fix incorrect format check in generic blitting code
This fixes a bunch of errors in 5 Days a Stranger (and all other games with 16-bit surfaces), including leaked memory and incorrectly displayed text.
This commit is contained in:
parent
614507859e
commit
7f84df864d
@ -88,7 +88,7 @@ void BITMAP::drawInnerGeneric(DrawInnerArgs &args) {
|
||||
*destVal = srcCol;
|
||||
continue;
|
||||
} else if ((DestBytesPerPixel == SrcBytesPerPixel) && args.srcAlpha == -1) {
|
||||
if (DestBytesPerPixel)
|
||||
if (DestBytesPerPixel == 4)
|
||||
*(uint32 *)destVal = srcCol;
|
||||
else
|
||||
*(uint16 *)destVal = srcCol;
|
||||
|
Loading…
x
Reference in New Issue
Block a user