From 8bc889380a359fddb70a21ea8b695041f294c74f Mon Sep 17 00:00:00 2001 From: duvvuvenkataramana Date: Mon, 24 Nov 2025 16:21:50 +0530 Subject: [PATCH] [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. --- src/rgestures.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgestures.h b/src/rgestures.h index f601a4790..23e7397b7 100644 --- a/src/rgestures.h +++ b/src/rgestures.h @@ -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