Skip to content

Commit b7afb7d

Browse files
yesyesnonovalyard
authored andcommitted
Fixed issue where ICoordinateRemapper was bypassed when dragging touch inputs
1 parent 7ab07a1 commit b7afb7d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Source/Assets/TouchScript/Scripts/InputSources/InputHandlers/TouchHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public bool UpdateInput()
115115
{
116116
if (touchState.Phase != TouchPhase.Canceled)
117117
{
118-
touchState.Pointer.Position = t.position;
118+
touchState.Pointer.Position = remapCoordinates(t.position);
119119
updatePointer(touchState.Pointer);
120120
}
121121
}

Source/Assets/TouchScript/Scripts/InputSources/InputHandlers/WindowsPointerHandlers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ private void nativePointer(int id, PointerEvent evt, PointerType type, Vector2 p
503503
releasePointer(mousePointer);
504504
break;
505505
case PointerEvent.Update:
506-
mousePointer.Position = position;
506+
mousePointer.Position = remapCoordinates(position);
507507
mousePointer.Buttons = updateButtons(mousePointer.Buttons, data.PointerFlags, data.ChangedButtons);
508508
updatePointer(mousePointer);
509509
break;
@@ -539,7 +539,7 @@ private void nativePointer(int id, PointerEvent evt, PointerType type, Vector2 p
539539
break;
540540
case PointerEvent.Update:
541541
if (!winTouchToInternalId.TryGetValue(id, out touchPointer)) return;
542-
touchPointer.Position = position;
542+
touchPointer.Position = remapCoordinates(position);
543543
touchPointer.Rotation = getTouchRotation(ref data);
544544
touchPointer.Pressure = getTouchPressure(ref data);
545545
updatePointer(touchPointer);
@@ -579,7 +579,7 @@ private void nativePointer(int id, PointerEvent evt, PointerType type, Vector2 p
579579
break;
580580
case PointerEvent.Update:
581581
if (penPointer == null) break;
582-
penPointer.Position = position;
582+
penPointer.Position = remapCoordinates(position);
583583
penPointer.Pressure = getPenPressure(ref data);
584584
penPointer.Rotation = getPenRotation(ref data);
585585
penPointer.Buttons = updateButtons(penPointer.Buttons, data.PointerFlags, data.ChangedButtons);

0 commit comments

Comments
 (0)