mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-18 08:56: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 byte outputPendCount = 0;
|
||||||
private void performDs4Output()
|
private unsafe void performDs4Output()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -640,7 +640,12 @@ namespace DS4Windows
|
|||||||
lock (outReportBuffer)
|
lock (outReportBuffer)
|
||||||
{
|
{
|
||||||
Monitor.Wait(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--;
|
outputPendCount--;
|
||||||
outputRumble = false;
|
outputRumble = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user