From da55658a804e12feb068d148d9d2d41c62b0e2f9 Mon Sep 17 00:00:00 2001 From: Ben Castricum Date: Wed, 29 Jun 2016 12:59:56 +0200 Subject: SDL: Fix mouse trailing part of bug #7141 Overlays are shown with _currentShakePos offset too, so no need to compensate the mousepointer position for overlays. This compensation was done inconsistently in draw/undraw mouse causing the mouse trails. --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'backends/graphics') diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 21345515bc..5b591e77ff 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -2047,7 +2047,7 @@ void SurfaceSdlGraphicsManager::undrawMouse() { return; if (_mouseBackup.w != 0 && _mouseBackup.h != 0) - addDirtyRect(x, y - _currentShakePos, _mouseBackup.w, _mouseBackup.h); + addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h); } void SurfaceSdlGraphicsManager::drawMouse() { @@ -2088,9 +2088,7 @@ void SurfaceSdlGraphicsManager::drawMouse() { // We draw the pre-scaled cursor image, so now we need to adjust for // scaling, shake position and aspect ratio correction manually. - if (!_overlayVisible) { - dst.y += _currentShakePos; - } + dst.y += _currentShakePos; if (_videoMode.aspectRatioCorrection && !_overlayVisible) dst.y = real2Aspect(dst.y); -- cgit v1.2.3