From 6f8de06ddb210f71f611e2cfcee106832d100a78 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 5 Apr 2016 13:19:43 -0400 Subject: TITANIC: Fix loading of ycursors.avi video that contains mouse cursors The mouse ccursor is now working correctly in-game, and correctly changing when different areas of the view are highlighted --- engines/titanic/support/avi_decoder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/titanic/support/avi_decoder.cpp b/engines/titanic/support/avi_decoder.cpp index 81d8a58b8d..578e3a94ea 100644 --- a/engines/titanic/support/avi_decoder.cpp +++ b/engines/titanic/support/avi_decoder.cpp @@ -265,7 +265,10 @@ void AVIDecoder::handleStreamHeader(uint32 size) { } } - addTrack(new AVIVideoTrack(_header.totalFrames, sHeader, bmInfo, initialPalette)); + // WORKAROUND: For Titanic engine, the ycursors.avi file has two video tracks, + // so we do an explicit check below to ignore any second video track + if (getFrameCount() == 0) + addTrack(new AVIVideoTrack(_header.totalFrames, sHeader, bmInfo, initialPalette)); } else if (sHeader.streamType == ID_AUDS) { PCMWaveFormat wvInfo; wvInfo.tag = _fileStream->readUint16LE(); -- cgit v1.2.3