Lower latency buffer to 10 items

This commit is contained in:
Travis Nickles 2018-07-21 00:55:16 -05:00
parent 1b687a03ea
commit 11c7f03244

View File

@ -717,7 +717,7 @@ namespace DS4Windows
{
firstActive = DateTime.UtcNow;
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
Queue<long> latencyQueue = new Queue<long>(21); // Set capacity at max + 1 to avoid any resizing
Queue<long> latencyQueue = new Queue<long>(11); // Set capacity at max + 1 to avoid any resizing
int tempLatencyCount = 0;
long oldtime = 0;
string currerror = string.Empty;
@ -746,7 +746,7 @@ namespace DS4Windows
oldCharging = charging;
currerror = string.Empty;
if (tempLatencyCount >= 20)
if (tempLatencyCount >= 10)
{
latencyQueue.Dequeue();
tempLatencyCount--;