From 8724cf2ea523b6cf26a5b2217c54c65673db5cb2 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 2 Mar 2020 13:29:36 +0100 Subject: Support any mouse button for gesture detection --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core.c b/src/core.c index c75909da..79b2ea44 100644 --- a/src/core.c +++ b/src/core.c @@ -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; -- cgit v1.2.3