From a253daa95d283071825c7fa9395e8d3d6bc8317c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 9 Jan 2019 19:30:05 -0600 Subject: [PATCH] Minimize influence of stopwatch --- DS4Windows/DS4Library/DS4Device.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 3f9f91d..93ee7a3 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -660,7 +660,9 @@ namespace DS4Windows //outReportBuffer.CopyTo(outputReport, 0); if (outputPendCount > 0) outputPendCount--; - standbySw.Restart(); + + if (outputPendCount == 0) + standbySw.Restart(); } currentRumble = true; @@ -1201,11 +1203,13 @@ namespace DS4Windows if (change) { outputPendCount = 3; + standbySw.Reset(); } else if (outputPendCount > 0) outputPendCount--; - standbySw.Restart(); + if (outputPendCount == 0) + standbySw.Restart(); if (usingBT) { @@ -1244,6 +1248,7 @@ namespace DS4Windows if (change) { outputPendCount = 3; + standbySw.Reset(); } Monitor.Pulse(outReportBuffer);