From 30dd56146fb102757f3aa8ac3ee2d3cbb4dc4140 Mon Sep 17 00:00:00 2001 From: Tienyu Yang <53754724+lingrottin@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:48:19 +0800 Subject: [PATCH] fix a problem --- MapTP.App/Touchpad/Handler.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MapTP.App/Touchpad/Handler.cs b/MapTP.App/Touchpad/Handler.cs index afc1b9e..4841d67 100644 --- a/MapTP.App/Touchpad/Handler.cs +++ b/MapTP.App/Touchpad/Handler.cs @@ -230,6 +230,11 @@ public static TouchpadContact[] ParseInput(IntPtr lParam) { creator.ContactId = (int)value; } + else if(valueCap.Usage == 0x42) + { + creator.TipSwitch = (int)value; + + } } else if (valueCap.UsagePage == 0x01) { @@ -242,10 +247,7 @@ public static TouchpadContact[] ParseInput(IntPtr lParam) creator.Y = (int)value; break; } - }else if(valueCap.UsagePage == 0x09 && valueCap.Usage == 0x42) - { - creator.TipSwitch = (int)value; - } + } break; }