aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-03-20 16:28:59 +0100
committerraysan5 <raysan5@gmail.com>2016-03-20 16:28:59 +0100
commitfa78023aa427e0c6e5a25e82102b296c51c24fe4 (patch)
tree6864d87a20ac61cf222d54a8b41391afdef0119e /src
parentebc2b9a286b07f551689f13fc82367c93e7c3ade (diff)
downloadraylib-fa78023aa427e0c6e5a25e82102b296c51c24fe4.tar.gz
raylib-fa78023aa427e0c6e5a25e82102b296c51c24fe4.zip
Understand mouse as touch in web
Diffstat (limited to 'src')
-rw-r--r--src/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index c8d78133..609da64e 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();