Pārlūkot izejas kodu

Normalize `gestureEvent.position` coordinates (#3406)

Fixed the fact that coordinates were not normalized on Android, preventing detection of `GESTURE_DOUBLE_TAP`
pull/3409/head
Le Juez Victor pirms 1 gada
committed by GitHub
vecāks
revīzija
36abc48cf8
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      src/rcore_android.c

+ 2
- 0
src/rcore_android.c Parādīt failu

@ -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

Notiek ielāde…
Atcelt
Saglabāt