mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-25 08:01:49 +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 quitOutputThread = false;
|
||||||
bool usingBT = conType == ConnectionType.BT;
|
bool usingBT = conType == ConnectionType.BT;
|
||||||
|
|
||||||
|
lock (outReportBuffer)
|
||||||
|
{
|
||||||
if (usingBT)
|
if (usingBT)
|
||||||
{
|
{
|
||||||
Monitor.Enter(outReportBuffer);
|
|
||||||
outReportBuffer[0] = 0x11;
|
outReportBuffer[0] = 0x11;
|
||||||
outReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate
|
outReportBuffer[1] = (byte)(0x80 | btPollRate); // input report rate
|
||||||
// enable rumble (0x01), lightbar (0x02), flash (0x04)
|
// enable rumble (0x01), lightbar (0x02), flash (0x04)
|
||||||
@ -1106,8 +1108,8 @@ namespace DS4Windows
|
|||||||
Monitor.Pulse(outReportBuffer);
|
Monitor.Pulse(outReportBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (usingBT) { Monitor.Exit(outReportBuffer); }
|
|
||||||
if (quitOutputThread)
|
if (quitOutputThread)
|
||||||
{
|
{
|
||||||
StopOutputUpdate();
|
StopOutputUpdate();
|
||||||
|
Loading…
Reference in New Issue
Block a user