diff options
Diffstat (limited to 'image')
-rw-r--r-- | image/codecs/cinepak.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/image/codecs/cinepak.cpp b/image/codecs/cinepak.cpp index 8d5dbceb4a..8464aa3889 100644 --- a/image/codecs/cinepak.cpp +++ b/image/codecs/cinepak.cpp @@ -52,11 +52,16 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() { _curFrame.strips = NULL; _y = 0; - if (bitsPerPixel == 8) + if (bitsPerPixel == 8) { _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); - else + } else { _pixelFormat = g_system->getScreenFormat(); + // Default to a 32bpp format, if in 8bpp mode + if (_pixelFormat.bytesPerPixel == 1) + _pixelFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); + } + // Create a lookup for the clip function // This dramatically improves the performance of the color conversion _clipTableBuf = new byte[1024]; |