From 680bed134bd96cb4437b8265aee1a8bcfd8bb7ad Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Mon, 17 Aug 2009 18:23:05 +0000 Subject: * 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 --- engines/draci/mouse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/draci/mouse.cpp') 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: -- cgit v1.2.3