mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 14:42:26 +00:00
* 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:
parent
74d4392a78
commit
680bed134b
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user