mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-12 00:09:11 +01:00
Add lock usage for USB again
The version without it seems a bit wonky
This commit is contained in:
parent
ed2910208b
commit
05def00614
@ -1029,9 +1029,11 @@ namespace DS4Windows
|
||||
|
||||
bool quitOutputThread = false;
|
||||
bool usingBT = conType == ConnectionType.BT;
|
||||
|
||||
lock (outReportBuffer)
|
||||
{
|
||||
if (usingBT)
|
||||
{
|
||||
Monitor.Enter(outReportBuffer);
|
||||
outReportBuffer[0] = 0x11;
|
||||
outReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate
|
||||
// enable rumble (0x01), lightbar (0x02), flash (0x04)
|
||||
@ -1106,8 +1108,8 @@ namespace DS4Windows
|
||||
Monitor.Pulse(outReportBuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (usingBT) { Monitor.Exit(outReportBuffer); }
|
||||
if (quitOutputThread)
|
||||
{
|
||||
StopOutputUpdate();
|
||||
|
Loading…
x
Reference in New Issue
Block a user