aboutsummaryrefslogtreecommitdiff
path: root/video/codecs/qtrle.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 16:35:12 +0200
committerJohannes Schickel2011-04-17 16:35:12 +0200
commit5e279996eb1f448712d1a6b64218a6cf65159a57 (patch)
treefb71f76a3de9f4a7e39b8c04c13c3aa081d8da10 /video/codecs/qtrle.cpp
parent2329a00873e2cea79dae2ffe1839501e05b39fe4 (diff)
downloadscummvm-rg350-5e279996eb1f448712d1a6b64218a6cf65159a57.tar.gz
scummvm-rg350-5e279996eb1f448712d1a6b64218a6cf65159a57.tar.bz2
scummvm-rg350-5e279996eb1f448712d1a6b64218a6cf65159a57.zip
VIDEO: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Certain codecs seem to use a Surface with Bpp 2, but do not have any proper format description. Whoever is maintaining these should check this commit and fix the format properly.
Diffstat (limited to 'video/codecs/qtrle.cpp')
-rw-r--r--video/codecs/qtrle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/codecs/qtrle.cpp b/video/codecs/qtrle.cpp
index 26b2f02ce1..78267cc56e 100644
--- a/video/codecs/qtrle.cpp
+++ b/video/codecs/qtrle.cpp
@@ -48,7 +48,7 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod
debug(2, "QTRLE corrected width: %d", width);
_surface = new Graphics::Surface();
- _surface->create(width, height, _bitsPerPixel <= 8 ? 1 : _pixelFormat.bytesPerPixel);
+ _surface->create(width, height, _bitsPerPixel <= 8 ? Graphics::PixelFormat::createFormatCLUT8() : _pixelFormat);
}
#define CHECK_STREAM_PTR(n) \