Sfoglia il codice sorgente

[rcore][android] Fix GESTURE_NONE not being reported when touch points are released (#5010)

The gesture system was not handling the case when all touch points are released (pointCount == 0), causing GESTURE_NONE to never be reported on Android.

This adds an else if block in ProcessGestureEvent() to handle pointCount == 0 and properly reset the gesture state to GESTURE_NONE.

Fixes issue #5010 where GetGestureDetected() would not return GESTURE_NONE after all touch points were released.
pull/5368/head
duvvuvenkataramana 3 mesi fa
committed by GitHub
parent
commit
8bc889380a
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: B5690EEEBB952194
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      src/rgestures.h

+ 4
- 0
src/rgestures.h Vedi File

@ -402,6 +402,10 @@ void ProcessGestureEvent(GestureEvent event)
GESTURES.current = GESTURE_NONE;
}
}
else if (GESTURES.Touch.pointCount == 0) // No touch points
{
GESTURES.current = GESTURE_NONE;
}
else if (GESTURES.Touch.pointCount > 2) // More than two touch points
{
// TODO: Process gesture events for more than two points

Caricamento…
Annulla
Salva