aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorEugene Sandulenko2005-08-15 01:23:41 +0000
committerEugene Sandulenko2005-08-15 01:23:41 +0000
commit76bd872c48d10aae4924bcd8a8d30adf22440574 (patch)
tree797fe7ff6a04a12159a0093b09d6716701c7e843 /backends/sdl
parent7aa7430c41736a5c1f80deca83253aa360181f76 (diff)
downloadscummvm-rg350-76bd872c48d10aae4924bcd8a8d30adf22440574.tar.gz
scummvm-rg350-76bd872c48d10aae4924bcd8a8d30adf22440574.tar.bz2
scummvm-rg350-76bd872c48d10aae4924bcd8a8d30adf22440574.zip
Apply bug/patch #1258912 "GUI: SDL mouse dirty rects too big"
svn-id: r18689
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/graphics.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index 7ffff5cb3b..1f339da656 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -1523,6 +1523,24 @@ void OSystem_SDL::drawMouse() {
src.w = dst.w;
src.h = dst.h;
+ // Patch #1258912 "GUI: SDL mouse dirty rects too big"
+ //
+ // At this point, dst.w and dst.h appear to be the correct values to
+ // assign to src.w and src.h above, but they are NOT the actual
+ // width and height of the mouse in virtual coordinates required for
+ // the dirty rects. If left uncorrected, the w and h values are 1.5x
+ // too large for 3x scalers when the overlay is visible, and 2x/3x too
+ // large for 2x/3x scalers when the overlay is not visible, resulting
+ // in dirty rects that are from 2.25x to 9x too large depending on the
+ // combination of scales.
+ if (!_overlayVisible) {
+ dst.w = _mouseCurState.w;
+ dst.h = _mouseCurState.h;
+ } else {
+ dst.w = _mouseCurState.w * _overlayScale;
+ dst.h = _mouseCurState.h * _overlayScale;
+ }
+
if (_adjustAspectRatio)
dst.y = real2Aspect(dst.y);