VIDEO: Add a workaround for the Inca 2 wisdom gate video

When decompressing directly onto the output surface fails (because
it's too small), retry decompressing into the video buffer first,
which then gets blitted onto the output surface.
This commit is contained in:
Sven Hesse 2011-03-29 12:47:20 +02:00
parent 8291732c94
commit 97966c36e1

View File

@ -1381,9 +1381,9 @@ bool IMDDecoder::renderFrame(Common::Rect &rect) {
const int offsetY = (_y + rect.top) * _surface.pitch;
const int offset = offsetX + offsetY;
deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
_surface.w * _surface.h * _surface.bytesPerPixel - offset);
return true;
if (deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
_surface.w * _surface.h * _surface.bytesPerPixel - offset))
return true;
}
_videoBufferLen[1] = deLZ77(_videoBuffer[1], dataPtr, dataSize, _videoBufferSize);
@ -2249,9 +2249,9 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
const int offsetY = (_y + rect.top) * _surface.pitch;
const int offset = offsetX - offsetY;
deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
_surface.w * _surface.h * _surface.bytesPerPixel - offset);
return true;
if (deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
_surface.w * _surface.h * _surface.bytesPerPixel - offset))
return true;
}
srcBuffer = 1;