diff options
-rw-r--r-- | engines/sherlock/surface.cpp | 3 |
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); } |