diff options
author | Ben Castricum | 2016-06-29 12:59:56 +0200 |
---|---|---|
committer | Ben Castricum | 2016-07-01 08:26:03 +0200 |
commit | da55658a804e12feb068d148d9d2d41c62b0e2f9 (patch) | |
tree | 46e45f90c0b3eb42154212e8486897cb2b89cd0b | |
parent | 8957bf4d7f13f28507a382bdd32c6f38d819ae27 (diff) | |
download | scummvm-rg350-da55658a804e12feb068d148d9d2d41c62b0e2f9.tar.gz scummvm-rg350-da55658a804e12feb068d148d9d2d41c62b0e2f9.tar.bz2 scummvm-rg350-da55658a804e12feb068d148d9d2d41c62b0e2f9.zip |
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.
-rw-r--r-- | backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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); |