diff options
Diffstat (limited to 'backends/events/webossdl/webossdl-events.cpp')
-rw-r--r-- | backends/events/webossdl/webossdl-events.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp index 72106789a5..8f124f2f2d 100644 --- a/backends/events/webossdl/webossdl-events.cpp +++ b/backends/events/webossdl/webossdl-events.cpp @@ -150,6 +150,9 @@ bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, _dragging = true; event.type = Common::EVENT_LBUTTONDOWN; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; } // If we're not in trackpad mode, move the cursor to the tap if (!_trackpadMode) { @@ -158,11 +161,17 @@ bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, // If we're already clicking, hold it until after the move. if (event.type == Common::EVENT_LBUTTONDOWN) { processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; g_system->getEventManager()->pushEvent(event); } // Move the mouse event.type = Common::EVENT_MOUSEMOVE; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; } // Watch for a double-tap-triggered drag _dragStartTime = g_system->getMillis(); @@ -191,6 +200,9 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, if (ev.button.which == 0 && _dragging) { event.type = Common::EVENT_LBUTTONUP; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; _dragging = false; } else { // If it was the first finger and the click hasn't been @@ -199,6 +211,9 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, !_fingerDown[1] && !_fingerDown[2]) { event.type = Common::EVENT_LBUTTONUP; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; g_system->getEventManager()->pushEvent(event); event.type = Common::EVENT_LBUTTONDOWN; if (_queuedDragTime > 0) @@ -209,6 +224,9 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, // right mouse click. event.type = Common::EVENT_RBUTTONDOWN; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; _queuedRUpTime = g_system->getMillis() + QUEUED_RUP_DELAY; } else if (ev.button.which == 2 && _fingerDown[0] && _fingerDown[1]) { @@ -217,6 +235,9 @@ bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, // as a right click. event.type = Common::EVENT_MBUTTONUP; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; g_system->getEventManager()->pushEvent(event); event.type = Common::EVENT_MBUTTONDOWN; _fingerDown[1] = false; @@ -263,6 +284,9 @@ bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev, } event.type = Common::EVENT_MOUSEMOVE; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; } break; case 1: @@ -407,12 +431,18 @@ bool WebOSSdlEventSource::pollEvent(Common::Event &event) { } else if (_queuedRUpTime != 0 && curTime >= _queuedRUpTime) { event.type = Common::EVENT_RBUTTONUP; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; _queuedRUpTime = 0; return true; } else if (_queuedDragTime != 0 && curTime >= _queuedDragTime) { event.type = Common::EVENT_LBUTTONDOWN; _dragging = true; processMouseEvent(event, _curX, _curY); + // update KbdMouse + _km.x = _curX * MULTIPLIER; + _km.y = _curY * MULTIPLIER; _queuedDragTime = 0; return true; } |