From 35031f5c5f5b6b2b83c774c30878f2dadf69e478 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 22 Jun 2017 07:36:40 -0700 Subject: [PATCH] Double check that mouse remainders are reset when gyro mouse is not active --- DS4Windows/DS4Control/Mouse.cs | 2 ++ DS4Windows/DS4Control/MouseCursor.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/DS4Windows/DS4Control/Mouse.cs b/DS4Windows/DS4Control/Mouse.cs index 9e62e41..43a8c7a 100644 --- a/DS4Windows/DS4Control/Mouse.cs +++ b/DS4Windows/DS4Control/Mouse.cs @@ -58,6 +58,8 @@ namespace DS4Windows cursor.sixaxisMoved(arg); else if (!useReverseRatchet && !triggeractivated) cursor.sixaxisMoved(arg); + else + cursor.mouseRemainderReset(); dev.getCurrentState(s); } diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index 64f2c78..fd7e5fe 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -109,6 +109,11 @@ namespace DS4Windows vDirection = yMotion > 0.0 ? Direction.Positive : yMotion < 0.0 ? Direction.Negative : Direction.Neutral; } + public void mouseRemainderReset() + { + hRemainder = vRemainder = 0.0; + } + public void touchesBegan(TouchpadEventArgs arg) { if (arg.touches.Length == 1)