Minimize influence of stopwatch

This commit is contained in:
Travis Nickles 2019-01-09 19:30:05 -06:00
parent 8556b6ffdb
commit a253daa95d

View File

@ -660,7 +660,9 @@ namespace DS4Windows
//outReportBuffer.CopyTo(outputReport, 0); //outReportBuffer.CopyTo(outputReport, 0);
if (outputPendCount > 0) if (outputPendCount > 0)
outputPendCount--; outputPendCount--;
standbySw.Restart();
if (outputPendCount == 0)
standbySw.Restart();
} }
currentRumble = true; currentRumble = true;
@ -1201,11 +1203,13 @@ namespace DS4Windows
if (change) if (change)
{ {
outputPendCount = 3; outputPendCount = 3;
standbySw.Reset();
} }
else if (outputPendCount > 0) else if (outputPendCount > 0)
outputPendCount--; outputPendCount--;
standbySw.Restart(); if (outputPendCount == 0)
standbySw.Restart();
if (usingBT) if (usingBT)
{ {
@ -1244,6 +1248,7 @@ namespace DS4Windows
if (change) if (change)
{ {
outputPendCount = 3; outputPendCount = 3;
standbySw.Reset();
} }
Monitor.Pulse(outReportBuffer); Monitor.Pulse(outReportBuffer);