From c6e6d0b3df9cea1c0a0cc76cef9699d6d74f8bb7 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 5 Aug 2017 14:10:47 +0200 Subject: MOHAWK: Riven: Ensure the entire view is drawn when pan transitions complete Fixes #10063. --- engines/mohawk/riven_graphics.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'engines/mohawk') diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 86b70d37ee..b9d82fbd39 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -198,12 +198,15 @@ public: return false; } - Common::Rect oldArea = Common::Rect( - newArea.right != _rect.right ? _rect.left + newArea.width() : _rect.left, - newArea.bottom != _rect.bottom ? _rect.top + newArea.height() : _rect.top, - newArea.left != _rect.left ? _rect.right - newArea.width() : _rect.right, - newArea.top != _rect.top ? _rect.bottom - newArea.height() : _rect.bottom - ); + Common::Rect oldArea; + if (newArea != _rect) { + oldArea = Common::Rect( + newArea.right != _rect.right ? _rect.left + newArea.width() : _rect.left, + newArea.bottom != _rect.bottom ? _rect.top + newArea.height() : _rect.top, + newArea.left != _rect.left ? _rect.right - newArea.width() : _rect.right, + newArea.top != _rect.top ? _rect.bottom - newArea.height() : _rect.bottom + ); + } int oldX = newArea.left != _rect.left ? _rect.left + newArea.width() : _rect.left; int oldY = newArea.top != _rect.top ? _rect.top + newArea.height() : _rect.top; -- cgit v1.2.3