From 11c7f03244bf9265b4a1c7716b590cd4b41bac46 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 21 Jul 2018 00:55:16 -0500 Subject: [PATCH] Lower latency buffer to 10 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 368de7c..7054218 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -717,7 +717,7 @@ namespace DS4Windows { firstActive = DateTime.UtcNow; NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2); - Queue latencyQueue = new Queue(21); // Set capacity at max + 1 to avoid any resizing + Queue latencyQueue = new Queue(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--;