From cf96b50f08faac7e13b990043c0171798d8a6000 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 6 Oct 2016 20:33:24 -0400 Subject: TITANIC: Fix videos playing vertically flipped --- engines/titanic/support/avi_surface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/titanic') diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index a45d586695..45c3ce94b3 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -223,10 +223,10 @@ void AVISurface::setupDecompressor() { bool flag = false; if (idx == 0 && _videoSurface && _videoSurface->getPitch() == _movieFrameSurface[idx]->pitch) { - const Graphics::PixelFormat &ff = _decoder->getVideoTrack(0).getPixelFormat(); + const uint bitCount = _decoder->getVideoTrack(0).getBitCount(); const int vDepth = _videoSurface->getPixelDepth(); - switch (ff.bpp()) { + switch (bitCount) { case 15: flag = vDepth == 1; break; @@ -248,6 +248,9 @@ void AVISurface::setupDecompressor() { _framePixels = new Graphics::ManagedSurface(_decoder->getWidth(), _decoder->getHeight(), _decoder->getVideoTrack(0).getPixelFormat()); } else if (idx == 0) { + // The original developers used a vertical flipped playback to indicate + // an incompatibility between source video and dest surface bit-depths, + // which would result in poor playback performance _videoSurface->_flipVertically = true; } } -- cgit v1.2.3