mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 23:51:49 +01:00
Testing new output report copying thread for USB and SONYWA
This commit is contained in:
parent
e3ed777682
commit
49d24fce7d
@ -539,6 +539,14 @@ namespace DS4Windows
|
|||||||
timeoutCheckThread.IsBackground = true;
|
timeoutCheckThread.IsBackground = true;
|
||||||
timeoutCheckThread.Start();
|
timeoutCheckThread.Start();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ds4Output = new Thread(OutReportCopy);
|
||||||
|
ds4Output.Priority = ThreadPriority.AboveNormal;
|
||||||
|
ds4Output.Name = "DS4 Arr Copy thread: " + Mac;
|
||||||
|
ds4Output.IsBackground = true;
|
||||||
|
ds4Output.Start();
|
||||||
|
}
|
||||||
|
|
||||||
ds4Input = new Thread(performDs4Input);
|
ds4Input = new Thread(performDs4Input);
|
||||||
ds4Input.Priority = ThreadPriority.AboveNormal;
|
ds4Input.Priority = ThreadPriority.AboveNormal;
|
||||||
@ -1203,6 +1211,10 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
Monitor.Exit(outputReport);
|
Monitor.Exit(outputReport);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Monitor.Pulse(outReportBuffer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1229,6 +1241,22 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OutReportCopy()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
while (!exitOutputThread)
|
||||||
|
{
|
||||||
|
lock (outReportBuffer)
|
||||||
|
{
|
||||||
|
outReportBuffer.CopyTo(outputReport, 0);
|
||||||
|
Monitor.Wait(outReportBuffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (ThreadInterruptedException) { }
|
||||||
|
}
|
||||||
|
|
||||||
public bool DisconnectBT(bool callRemoval = false)
|
public bool DisconnectBT(bool callRemoval = false)
|
||||||
{
|
{
|
||||||
if (Mac != null)
|
if (Mac != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user