Add lock for DisconnectDongle

This commit is contained in:
Travis Nickles 2017-05-01 02:50:02 -07:00
parent d37e0709c0
commit d35ba4db98

View File

@ -905,7 +905,11 @@ namespace DS4Windows
disconnectReport[1] = 0x02; disconnectReport[1] = 0x02;
Array.Clear(disconnectReport, 2, 63); Array.Clear(disconnectReport, 2, 63);
result = hDevice.WriteFeatureReport(disconnectReport); lock (outputReport)
{
result = hDevice.WriteFeatureReport(disconnectReport);
}
if (result && remove) if (result && remove)
{ {
isDisconnecting = true; isDisconnecting = true;