diff options
| author | Ray <[email protected]> | 2020-03-02 13:29:36 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-03-02 13:29:36 +0100 |
| commit | 8724cf2ea523b6cf26a5b2217c54c65673db5cb2 (patch) | |
| tree | a0f7bedacbfca82aaa0100af19bcf6f61321be31 /src | |
| parent | 485787059a00e54287f465464ce6e430fe9488c6 (diff) | |
| download | raylib-8724cf2ea523b6cf26a5b2217c54c65673db5cb2.tar.gz raylib-8724cf2ea523b6cf26a5b2217c54c65673db5cb2.zip | |
Support any mouse button for gesture detection
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
