aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorEugene Sandulenko2010-07-23 16:38:31 +0000
committerEugene Sandulenko2010-07-23 16:38:31 +0000
commitb3f08d183b5fdafa850dc87401fc74d71476ef5d (patch)
tree83cc2e8dd808ce6e2347cf55c718ae8b57b13a42 /backends/platform/sdl
parent11a17b3908400904288432cfdd7b60c7e44ec0cb (diff)
downloadscummvm-rg350-b3f08d183b5fdafa850dc87401fc74d71476ef5d.tar.gz
scummvm-rg350-b3f08d183b5fdafa850dc87401fc74d71476ef5d.tar.bz2
scummvm-rg350-b3f08d183b5fdafa850dc87401fc74d71476ef5d.zip
SDL: Fix bug #3025258
Bug #3025258: "Cursor Leaves Trail in GUI when Screen is Shaking". Based on patch provided by eriktorbjorn but extended with another edge case. svn-id: r51212
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/graphics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index 35c5b57db6..a97a153f3c 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -783,7 +783,8 @@ void OSystem_SDL::internUpdateScreen() {
#endif
// If the shake position changed, fill the dirty area with blackness
- if (_currentShakePos != _newShakePos) {
+ if (_currentShakePos != _newShakePos ||
+ (_mouseNeedsRedraw && _mouseBackup.y <= _currentShakePos)) {
SDL_Rect blackrect = {0, 0, _videoMode.screenWidth * _videoMode.scaleFactor, _newShakePos * _videoMode.scaleFactor};
if (_videoMode.aspectRatioCorrection && !_overlayVisible)
@@ -1681,7 +1682,7 @@ void OSystem_SDL::undrawMouse() {
return;
if (_mouseBackup.w != 0 && _mouseBackup.h != 0)
- addDirtyRect(x, y, _mouseBackup.w, _mouseBackup.h);
+ addDirtyRect(x, y - _currentShakePos, _mouseBackup.w, _mouseBackup.h);
}
void OSystem_SDL::drawMouse() {