touch event handling to use tracking ID for unique touch identification

This commit is contained in:
MULTidll 2025-11-30 22:46:20 +05:30 committed by MULTi
parent 722e446e33
commit 7379e3ad2f

View File

@ -2366,14 +2366,10 @@ static void PollMouseEvents(void)
{ {
if (event.value >= 0) 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
// Force DOWN action, even if we previously detected a MOVE or UP in this frame platform.touchActive[platform.touchSlot] = true;
// A new touch is a significant state change that should take priority platform.touchId[platform.touchSlot] = event.value; // Use Tracking ID for unique IDs
touchAction = 1; // TOUCH_ACTION_DOWN touchAction = 1; // TOUCH_ACTION_DOWN
} }
else else