From 4b32d5de0e83551e18e23a5be575d24585f1d91d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:18:19 +0200 Subject: WII: Fix check for whole width updates in copyRectToOverlay. --- backends/platform/wii/osystem_gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 6fbf51a8d1..90e4d98c6b 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -608,8 +608,8 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x, return; uint16 *dst = _overlayPixels + (y * _overlayWidth + x); - if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, src, h * w * sizeof(uint16)); + if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) { + memcpy(dst, src, h * pitch); } else { do { memcpy(dst, src, w * sizeof(uint16)); -- cgit v1.2.3