Fix issue with USB sending constant output reports. Only copy relevant output bytes for BT.

Related to issue #290.
This commit is contained in:
Travis Nickles 2018-05-28 03:09:55 -05:00
parent f5ce078488
commit d3fafbb32a

View File

@ -640,7 +640,7 @@ namespace DS4Windows
Monitor.Wait(outReportBuffer);
fixed (byte* byteR = outputReport, byteB = outReportBuffer)
{
for (int i = 0, arlen = outputReport.Length; i < arlen; i++)
for (int i = 0, arlen = 13; i < arlen; i++)
byteR[i] = byteB[i];
}
//outReportBuffer.CopyTo(outputReport, 0);
@ -1166,9 +1166,10 @@ namespace DS4Windows
if (usingBT)
{
Monitor.Enter(outputReport);
outReportBuffer.CopyTo(outputReport, 0);
}
outReportBuffer.CopyTo(outputReport, 0);
try
{
if (!writeOutput())