aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/util.cpp
diff options
context:
space:
mode:
authorSven Hesse2008-09-07 15:29:47 +0000
committerSven Hesse2008-09-07 15:29:47 +0000
commit7eaad9da669b4536f9ce4384bb9dcfeafd89216d (patch)
treeb15f4434f2b91625d706a808ca9d42048809d7e9 /engines/gob/util.cpp
parenta7d917ea43d771e62932573b8a3caefa6bd0dacc (diff)
downloadscummvm-rg350-7eaad9da669b4536f9ce4384bb9dcfeafd89216d.tar.gz
scummvm-rg350-7eaad9da669b4536f9ce4384bb9dcfeafd89216d.tar.bz2
scummvm-rg350-7eaad9da669b4536f9ce4384bb9dcfeafd89216d.zip
Actually, /now/ the values are sane ^^; (also fixes Ween mouse position bug #2046244)
svn-id: r34411
Diffstat (limited to 'engines/gob/util.cpp')
-rw-r--r--engines/gob/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index fa1683b109..fcf19f03dd 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -234,8 +234,8 @@ void Util::getMouseState(int16 *pX, int16 *pY, int16 *pButtons) {
}
void Util::setMousePos(int16 x, int16 y) {
- x = CLIP<int>(x + _vm->_video->_screenDeltaX, 0, _vm->_width);
- y = CLIP<int>(y + _vm->_video->_screenDeltaY, 0, _vm->_height);
+ x = CLIP<int>(x + _vm->_video->_screenDeltaX, 0, _vm->_width - 1);
+ y = CLIP<int>(y + _vm->_video->_screenDeltaY, 0, _vm->_height - 1);
g_system->warpMouse(x, y);
}