From 7379e3ad2f3fcc37fa18ce1c05d6cfb8c3d6b874 Mon Sep 17 00:00:00 2001 From: MULTidll Date: Sun, 30 Nov 2025 22:46:20 +0530 Subject: [PATCH] touch event handling to use tracking ID for unique touch identification --- src/platforms/rcore_drm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index de129124f..34fd27e07 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -2366,14 +2366,10 @@ static void PollMouseEvents(void) { if (event.value >= 0) { - // Touch has started for this point - // If it was already active, it means we missed a lift event or the ID changed - // We should treat it as a new touch + platform.touchActive[platform.touchSlot] = true; - platform.touchId[platform.touchSlot] = platform.touchSlot; // Use slot index as ID for stability + platform.touchId[platform.touchSlot] = event.value; // Use Tracking ID for unique IDs - // Force DOWN action, even if we previously detected a MOVE or UP in this frame - // A new touch is a significant state change that should take priority touchAction = 1; // TOUCH_ACTION_DOWN } else