mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Use unsafe memory pointers for BT output report
This commit is contained in:
parent
f3a019742d
commit
63688885cd
@ -604,7 +604,7 @@ namespace DS4Windows
|
||||
}
|
||||
|
||||
private byte outputPendCount = 0;
|
||||
private void performDs4Output()
|
||||
private unsafe void performDs4Output()
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -640,7 +640,12 @@ namespace DS4Windows
|
||||
lock (outReportBuffer)
|
||||
{
|
||||
Monitor.Wait(outReportBuffer);
|
||||
outReportBuffer.CopyTo(outputReport, 0);
|
||||
fixed (byte* byteR = outputReport, byteB = outReportBuffer)
|
||||
{
|
||||
for (int i = 0, arlen = outputReport.Length; i < arlen; i++)
|
||||
byteR[i] = byteB[i];
|
||||
}
|
||||
//outReportBuffer.CopyTo(outputReport, 0);
|
||||
outputPendCount--;
|
||||
outputRumble = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user