aboutsummaryrefslogtreecommitdiff
path: root/graphics/thumbnail.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/thumbnail.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/thumbnail.cpp')
-rw-r--r--graphics/thumbnail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index 8688096c3d..953faea484 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -107,10 +107,10 @@ bool loadThumbnail(Common::SeekableReadStream &in, Graphics::Surface &to) {
return false;
}
- to.create(header.width, header.height, sizeof(OverlayColor));
+ Graphics::PixelFormat format = g_system->getOverlayFormat();
+ to.create(header.width, header.height, format);
OverlayColor *pixels = (OverlayColor *)to.pixels;
- Graphics::PixelFormat format = g_system->getOverlayFormat();
for (int y = 0; y < to.h; ++y) {
for (int x = 0; x < to.w; ++x) {
uint8 r, g, b;