From 852a9fe52449241d6abb0d9d785442b490d7a572 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Dec 2017 17:18:57 -0600 Subject: [PATCH] Lower latency queue to hold 20 items --- DS4Windows/DS4Library/DS4Device.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index d8ebc6c..1d97917 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -663,7 +663,7 @@ namespace DS4Windows { firstActive = DateTime.UtcNow; NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2); - Queue latencyQueue = new Queue(31); // Set capacity at max + 1 to avoid any resizing + Queue latencyQueue = new Queue(21); // Set capacity at max + 1 to avoid any resizing int tempLatencyCount = 0; long oldtime = 0; string currerror = string.Empty; @@ -687,7 +687,7 @@ namespace DS4Windows oldCharging = charging; currerror = string.Empty; - if (tempLatencyCount >= 30) + if (tempLatencyCount >= 20) { latencyQueue.Dequeue(); tempLatencyCount--;