MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Mouse_HandleMovement

Function Mouse_HandleMovement

src/input/mouse.c:303–314  ·  view source on GitHub ↗

* Handle movement of the mouse. * @param newButtonState State of the mouse buttons. * @param mouseX Horizontal position of the mouse cursor. * @param mouseY Vertical position of the mouse cursor. */

Source from the content-addressed store, hash-verified

301 * @param mouseY Vertical position of the mouse cursor.
302 */
303void Mouse_HandleMovement(uint16 newButtonState, uint16 mouseX, uint16 mouseY)
304{
305 g_mouseLock = 0x1;
306
307 g_mouseX = mouseX;
308 g_mouseY = mouseY;
309 if (g_mouseMode != INPUT_MOUSE_MODE_PLAY && g_mouseMode != INPUT_MOUSE_MODE_NORMAL && (g_inputFlags & INPUT_FLAG_NO_CLICK) == 0) {
310 Input_HandleInput(Mouse_CheckButtons(newButtonState));
311 }
312
313 Mouse_CheckMovement(mouseX, mouseY);
314}
315
316/**
317 * Perform handling of mouse movement iff the mouse position changed.

Callers 2

Mouse_EventHandlerFunction · 0.85

Calls 3

Input_HandleInputFunction · 0.85
Mouse_CheckButtonsFunction · 0.85
Mouse_CheckMovementFunction · 0.85

Tested by

no test coverage detected