From fa78023aa427e0c6e5a25e82102b296c51c24fe4 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 20 Mar 2016 16:28:59 +0100 Subject: [PATCH] Understand mouse as touch in web --- src/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core.c b/src/core.c index c8d781337..609da64e0 100644 --- a/src/core.c +++ b/src/core.c @@ -1793,6 +1793,8 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y) // Register touch points position, only one point registered gestureEvent.position[0] = (Vector2){ (float)x, (float)y }; + touchPosition[0] = gestureEvent.position[0]; + // Normalize gestureEvent.position[0] for screenWidth and screenHeight gestureEvent.position[0].x /= (float)GetScreenWidth(); gestureEvent.position[0].y /= (float)GetScreenHeight();