Browse Source

Support any mouse button for gesture detection

pull/1120/head
Ray 5 years ago
parent
commit
8724cf2ea5
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/core.c

+ 2
- 2
src/core.c View File

@ -4021,8 +4021,8 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
GestureEvent gestureEvent = { 0 };
// Register touch actions
if ((CORE.Input.Mouse.currentButtonState[MOUSE_LEFT_BUTTON] != CORE.Input.Mouse.previousButtonState[MOUSE_LEFT_BUTTON]) &&
(CORE.Input.Mouse.currentButtonState[MOUSE_LEFT_BUTTON] == 1)) gestureEvent.touchAction = TOUCH_DOWN;
if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
(CORE.Input.Mouse.currentButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_DOWN;
else if ((CORE.Input.Mouse.currentButtonState[button] != CORE.Input.Mouse.previousButtonState[button]) &&
(CORE.Input.Mouse.currentButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_UP;

Loading…
Cancel
Save