* 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
This commit is contained in:
Denis Kasak 2009-08-17 18:23:05 +00:00
parent 74d4392a78
commit 680bed134b

View File

@ -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: