diff options
| author | raysan5 <raysan5@gmail.com> | 2016-03-20 16:28:59 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-03-20 16:28:59 +0100 |
| commit | fa78023aa427e0c6e5a25e82102b296c51c24fe4 (patch) | |
| tree | 6864d87a20ac61cf222d54a8b41391afdef0119e /src | |
| parent | ebc2b9a286b07f551689f13fc82367c93e7c3ade (diff) | |
| download | raylib-fa78023aa427e0c6e5a25e82102b296c51c24fe4.tar.gz raylib-fa78023aa427e0c6e5a25e82102b296c51c24fe4.zip | |
Understand mouse as touch in web
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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(); |
