From 33aef3a4c61cec378f24f40b2c6f80e0f9f2a9a7 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 1 Apr 2018 00:36:33 -0500 Subject: [PATCH] Change sync output report method to add extra lock for recent changes --- DS4Windows/DS4Library/DS4Device.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 19a1814..631427c 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -1149,11 +1149,8 @@ namespace DS4Windows outputRumble = false; outputPendCount = 3; - if (usingBT) - { - Monitor.Enter(outputReport); - outReportBuffer.CopyTo(outputReport, 0); - } + Monitor.Enter(outputReport); + outReportBuffer.CopyTo(outputReport, 0); try { @@ -1165,7 +1162,7 @@ namespace DS4Windows } catch { } // If it's dead already, don't worry about it. - if (usingBT) { Monitor.Exit(outputReport); } + Monitor.Exit(outputReport); } else {