diff options
| author | Le Juez Victor <[email protected]> | 2023-10-13 19:54:00 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-13 19:54:00 +0200 |
| commit | 36abc48cf8abe008f7f02516dcf1c1985517aee4 (patch) | |
| tree | c004d532b0f3f383b9a80a457b5b257aaa2a0828 | |
| parent | f3c27ec157f3a3e914f8872714173f87e7ea7751 (diff) | |
| download | raylib-36abc48cf8abe008f7f02516dcf1c1985517aee4.tar.gz raylib-36abc48cf8abe008f7f02516dcf1c1985517aee4.zip | |
Normalize `gestureEvent.position` coordinates (#3406)
Fixed the fact that coordinates were not normalized on Android, preventing detection of `GESTURE_DOUBLE_TAP`
| -rw-r--r-- | src/rcore_android.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rcore_android.c b/src/rcore_android.c index 39e4694c..3d9fab06 100644 --- a/src/rcore_android.c +++ b/src/rcore_android.c @@ -1152,6 +1152,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) { gestureEvent.pointId[i] = CORE.Input.Touch.pointId[i]; gestureEvent.position[i] = CORE.Input.Touch.position[i]; + gestureEvent.position[i].x /= (float)GetScreenWidth(); + gestureEvent.position[i].y /= (float)GetScreenHeight(); } // Gesture data is sent to gestures system for processing |
