diff --git a/ControllerService/DS4Touch.cs b/ControllerService/DS4Touch.cs index 7baad4043..804c69418 100644 --- a/ControllerService/DS4Touch.cs +++ b/ControllerService/DS4Touch.cs @@ -45,13 +45,20 @@ public DS4Touch() public void OnMouseUp(short X, short Y, int Button) { - OutputClickButton = false; + if (X != -1) TouchX = (short)(X * RatioWidth); + if (Y != -1) TouchY = (short)(Y * RatioHeight); + + TrackPadTouch0.X = TouchX; + TrackPadTouch1.X = TouchX; + + TrackPadTouch0.Y = TouchY; + TrackPadTouch1.Y = TouchY; if (Button == 2097152) // MouseButtons.Right + { + OutputClickButton = false; return; - - if (X != -1) TouchX = (short)(X * RatioWidth); - if (Y != -1) TouchY = (short)(Y * RatioHeight); + } TrackPadTouch0.RawTrackingNum = TOUCH0_ID + TOUCH_DISABLE; TrackPadTouch1.RawTrackingNum = TOUCH1_ID + TOUCH_DISABLE; @@ -61,15 +68,6 @@ public void OnMouseUp(short X, short Y, int Button) public void OnMouseDown(short X, short Y, int Button) { - if (Button == 2097152) // MouseButtons.Right - { - OutputClickButton = true; - return; - } - - TrackPadTouch0.RawTrackingNum = TOUCH0_ID; - TrackPadTouch1.RawTrackingNum = TOUCH1_ID; - TouchX = (short)(X * RatioWidth); TouchY = (short)(Y * RatioHeight); @@ -78,12 +76,19 @@ public void OnMouseDown(short X, short Y, int Button) TrackPadTouch0.Y = TouchY; TrackPadTouch1.Y = TouchY; + + if (Button == 2097152) // MouseButtons.Right + { + OutputClickButton = true; + return; + } + + TrackPadTouch0.RawTrackingNum = TOUCH0_ID; + TrackPadTouch1.RawTrackingNum = TOUCH1_ID; } public void OnMouseMove(short X, short Y, int Button) { - OutputClickButton = false; - TouchX = (short)(X * RatioWidth); TouchY = (short)(Y * RatioHeight);