diff options
author | Filippos Karapetis | 2011-10-18 03:24:46 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-18 03:24:46 +0300 |
commit | 289e4e6cfb69aace57e0c90cd8c0411247a99e4d (patch) | |
tree | 9d77648cfb4d443989b474a9420f62a30e121a49 /engines/sci/engine | |
parent | 7708a4ddbbcd7e7880890be252f5be1fa6a8eabb (diff) | |
download | scummvm-rg350-289e4e6cfb69aace57e0c90cd8c0411247a99e4d.tar.gz scummvm-rg350-289e4e6cfb69aace57e0c90cd8c0411247a99e4d.tar.bz2 scummvm-rg350-289e4e6cfb69aace57e0c90cd8c0411247a99e4d.zip |
SCI: Duck videos are 16bpp, so we need to change the active pixel format
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 3087e46d2c..c9cf652013 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -397,8 +397,23 @@ reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) { if (reshowCursor) g_sci->_gfxCursor->kernelHide(); + { + // Duck videos are 16bpp, so we need to change the active pixel format + int oldWidth = g_system->getWidth(); + int oldHeight = g_system->getHeight(); + Common::List<Graphics::PixelFormat> formats; + formats.push_back(videoDecoder->getPixelFormat()); + initGraphics(640, 480, true, formats); + + if (g_system->getScreenFormat().bytesPerPixel != videoDecoder->getPixelFormat().bytesPerPixel) + error("Could not switch screen format for the duck video"); + playVideo(videoDecoder, s->_videoState); + // Switch back to 8bpp + initGraphics(oldWidth, oldHeight, oldWidth > 320); + } + if (reshowCursor) g_sci->_gfxCursor->kernelShow(); break; |