Преглед изворни кода

touch event handling to use tracking ID for unique touch identification

pull/5448/head
MULTidll пре 2 месеци
родитељ
комит
6bdfb1d931
1 измењених фајлова са 2 додато и 6 уклоњено
  1. +2
    -6
      src/platforms/rcore_drm.c

+ 2
- 6
src/platforms/rcore_drm.c Прегледај датотеку

@ -2382,14 +2382,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.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 touchAction = 1; // TOUCH_ACTION_DOWN
} }
else else

Loading…
Откажи
Сачувај