Skip to content

Commit

Permalink
Normalize gestureEvent.position coordinates
Browse files Browse the repository at this point in the history
Fixed the fact that coordinates were not normalized on Android, preventing detection of `GESTURE_DOUBLE_TAP`
  • Loading branch information
Bigfoot71 authored Oct 13, 2023
1 parent 0f4a8cf commit c92f54a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rcore_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c92f54a

Please sign in to comment.