diff options
author | Denis Kasak | 2009-08-17 18:23:05 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-17 18:23:05 +0000 |
commit | 680bed134bd96cb4437b8265aee1a8bcfd8bb7ad (patch) | |
tree | defb140dc06c3eee82edb6ecc439be634c3e97ef /engines | |
parent | 74d4392a78889ee162c6626c7c5c3f331f23e5a4 (diff) | |
download | scummvm-rg350-680bed134bd96cb4437b8265aee1a8bcfd8bb7ad.tar.gz scummvm-rg350-680bed134bd96cb4437b8265aee1a8bcfd8bb7ad.tar.bz2 scummvm-rg350-680bed134bd96cb4437b8265aee1a8bcfd8bb7ad.zip |
* Set the _x and _y position for the mouse only when an EVENT_MOUSEMOVE happens.
* Stop calling Mouse::setPosition() on EVENT_MOUSEMOVE since it's not needed (the engine warps the mouse automatically; I still left the method for situations when we want to warp the mouse explicitly).
svn-id: r43484
Diffstat (limited to 'engines')
-rw-r--r-- | engines/draci/mouse.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp index dc10efbab8..53c227d626 100644 --- a/engines/draci/mouse.cpp +++ b/engines/draci/mouse.cpp @@ -39,8 +39,6 @@ Mouse::Mouse(DraciEngine *vm) { } void Mouse::handleEvent(Common::Event event) { - _x = (uint16) event.mouse.x; - _y = (uint16) event.mouse.y; switch (event.type) { case Common::EVENT_LBUTTONDOWN: @@ -64,7 +62,9 @@ void Mouse::handleEvent(Common::Event event) { break; case Common::EVENT_MOUSEMOVE: - setPosition(_x, _y); + debugC(6, kDraciGeneralDebugLevel, "Mouse move (x: %u y: %u)", _x, _y); + _x = (uint16) event.mouse.x; + _y = (uint16) event.mouse.y; break; default: |