diff options
author | Strangerke | 2013-09-08 14:49:34 +0200 |
---|---|---|
committer | Strangerke | 2013-09-08 14:49:34 +0200 |
commit | 599d2eeb06c937a4479cc751f4f9f5e94795c43b (patch) | |
tree | 6efd0f887d7a1fd5082209a585d609983031c92d /engines/tinsel/tinsel.h | |
parent | 7df4c94aeb6c1408d26d6ada58d728b6eac17717 (diff) | |
parent | 03bf56ea82c0b89f4e61e5e0787a36473f999efa (diff) | |
download | scummvm-rg350-599d2eeb06c937a4479cc751f4f9f5e94795c43b.tar.gz scummvm-rg350-599d2eeb06c937a4479cc751f4f9f5e94795c43b.tar.bz2 scummvm-rg350-599d2eeb06c937a4479cc751f4f9f5e94795c43b.zip |
Merge branch 'master' into avalanche
Diffstat (limited to 'engines/tinsel/tinsel.h')
-rw-r--r-- | engines/tinsel/tinsel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 56fed3007f..5eb3b7d7b8 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -226,7 +226,11 @@ public: Graphics::Surface &screen() { return _screenSurface; } Common::Point getMousePosition() const { return _mousePos; } - void setMousePosition(const Common::Point &pt) { + void setMousePosition(Common::Point pt) { + // Clip mouse position to be within the screen coordinates + pt.x = CLIP<int16>(pt.x, 0, SCREEN_WIDTH - 1); + pt.y = CLIP<int16>(pt.y, 0, SCREEN_HEIGHT - 1); + int yOffset = TinselV2 ? (g_system->getHeight() - _screenSurface.h) / 2 : 0; g_system->warpMouse(pt.x, pt.y + yOffset); _mousePos = pt; |