diff options
-rw-r--r-- | engines/sci/graphics/video32.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index f4aa7664d3..b9fc7061a7 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -269,6 +269,11 @@ void AVIPlayer::init() { g_sci->_gfxFrameout->addScreenItem(*_screenItem); g_sci->_gfxFrameout->frameOut(true); } else { + // Attempting to draw a palettized cursor into a 24bpp surface will + // cause memory corruption, so hide the cursor in this mode (SCI did not + // have a 24bpp mode but just directed VFW to display videos instead) + g_sci->_gfxCursor32->hide(); + const Buffer ¤tBuffer = g_sci->_gfxFrameout->getCurrentBuffer(); const Graphics::PixelFormat format = _decoder->getPixelFormat(); initGraphics(currentBuffer.screenWidth, currentBuffer.screenHeight, g_sci->_gfxFrameout->_isHiRes, &format); @@ -326,6 +331,7 @@ AVIPlayer::IOStatus AVIPlayer::close() { const Buffer ¤tBuffer = g_sci->_gfxFrameout->getCurrentBuffer(); const Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8(); initGraphics(currentBuffer.screenWidth, currentBuffer.screenHeight, isHiRes, &format); + g_sci->_gfxCursor32->unhide(); } _decoder->close(); |