From 877be04203020f5a8a2509596a555b7cc0db84aa Mon Sep 17 00:00:00 2001 From: William Belcher Date: Wed, 14 Feb 2024 14:02:48 +1000 Subject: [PATCH] Update TouchStart and TouchMove handlers to force a touch force of 1 if the touch.force member is 0 (#486) (cherry picked from commit 664d40b8014f641e515afa24545bc4e4d01d1b89) --- Frontend/library/src/Inputs/TouchController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/library/src/Inputs/TouchController.ts b/Frontend/library/src/Inputs/TouchController.ts index e03b76e1..bd798258 100644 --- a/Frontend/library/src/Inputs/TouchController.ts +++ b/Frontend/library/src/Inputs/TouchController.ts @@ -178,7 +178,7 @@ export class TouchController implements ITouchController { coord.x, coord.y, this.fingerIds.get(touch.identifier), - this.maxByteValue * touch.force, + this.maxByteValue * (touch.force > 0 ? touch.force : 1), coord.inRange ? 1 : 0 ]); break; @@ -198,7 +198,7 @@ export class TouchController implements ITouchController { coord.x, coord.y, this.fingerIds.get(touch.identifier), - this.maxByteValue * touch.force, + this.maxByteValue * (touch.force > 0 ? touch.force : 1), coord.inRange ? 1 : 0 ]); break;