aboutsummaryrefslogtreecommitdiff
path: root/graphics/imagedec.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 16:24:52 +0200
committerJohannes Schickel2011-04-17 16:24:52 +0200
commit39b993fb02749a2a1988f64d3443580f2e1c03ef (patch)
tree582ee5e5230d2445fe8e63ba3fdcce4320cced34 /graphics/imagedec.cpp
parent7ac3ae108a69587693e0820cde43a63c34a186ec (diff)
downloadscummvm-rg350-39b993fb02749a2a1988f64d3443580f2e1c03ef.tar.gz
scummvm-rg350-39b993fb02749a2a1988f64d3443580f2e1c03ef.tar.bz2
scummvm-rg350-39b993fb02749a2a1988f64d3443580f2e1c03ef.zip
GRAPHICS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Diffstat (limited to 'graphics/imagedec.cpp')
-rw-r--r--graphics/imagedec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index a4d2fbc1cf..b41eb59836 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -117,7 +117,7 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream, const Pixel
uint8 r = 0, g = 0, b = 0;
Surface *newSurf = new Surface;
assert(newSurf);
- newSurf->create(info.width, info.height, sizeof(OverlayColor));
+ newSurf->create(info.width, info.height, format);
assert(newSurf->pixels);
OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w;
int pitchAdd = info.width % 4;