aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/surface.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-12 13:30:16 +0200
committerMartin Kiewitz2015-06-12 13:30:16 +0200
commitb668b1edd724b8c281edacb68665cd037c5d9bd2 (patch)
tree3b77fbf807ee18349f76459fff6a3effad3e3a8b /engines/sherlock/surface.cpp
parent3cca918ec745418bad4081b38211f82d47e1091e (diff)
downloadscummvm-rg350-b668b1edd724b8c281edacb68665cd037c5d9bd2.tar.gz
scummvm-rg350-b668b1edd724b8c281edacb68665cd037c5d9bd2.tar.bz2
scummvm-rg350-b668b1edd724b8c281edacb68665cd037c5d9bd2.zip
SHERLOCK: 3DO: fix setPixels() for RGB565
Diffstat (limited to 'engines/sherlock/surface.cpp')
-rw-r--r--engines/sherlock/surface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sherlock/surface.cpp b/engines/sherlock/surface.cpp
index 8f3690b108..48045beacd 100644
--- a/engines/sherlock/surface.cpp
+++ b/engines/sherlock/surface.cpp
@@ -270,8 +270,9 @@ void Surface::free() {
void Surface::setPixels(byte *pixels, int width, int height, Graphics::PixelFormat pixelFormat) {
_surface.format = pixelFormat;
- _surface.w = _surface.pitch = width;
+ _surface.w = width;
_surface.h = height;
+ _surface.pitch = width * pixelFormat.bytesPerPixel;
_surface.setPixels(pixels);
}