aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/gfx
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2014-02-05 17:18:18 +0100
committerEinar Johan Trøan Sømåen2014-02-05 17:18:46 +0100
commit2ad7625831897d97524891cb88af8b3e48e4facb (patch)
tree5c3a69f6a283c70d87efd6ea2e9bd4803eb62649 /engines/wintermute/base/gfx
parentcfb0492cbbd4f86d260426a9db2d14f7c365da6b (diff)
downloadscummvm-rg350-2ad7625831897d97524891cb88af8b3e48e4facb.tar.gz
scummvm-rg350-2ad7625831897d97524891cb88af8b3e48e4facb.tar.bz2
scummvm-rg350-2ad7625831897d97524891cb88af8b3e48e4facb.zip
WINTERMUTE: Change the copyFrom-simplifications to depend on pitch instead of width. (Fix bug #6157)
Diffstat (limited to 'engines/wintermute/base/gfx')
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index c33e8ba54b..cbc32387e1 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -447,7 +447,7 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect,
bool BaseSurfaceOSystem::putSurface(const Graphics::Surface &surface, bool hasAlpha) {
_loaded = true;
- if (surface.format == _surface->format && surface.w == _surface->w && surface.h == _surface->h) {
+ if (surface.format == _surface->format && surface.pitch == _surface->pitch && surface.h == _surface->h) {
const byte *src = (const byte *)surface.getBasePtr(0, 0);
byte *dst = (byte *)_surface->getBasePtr(0, 0);
memcpy(dst, src, surface.pitch * surface.h);