mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Lower latency queue to hold 20 items
This commit is contained in:
parent
fa1f4760bf
commit
852a9fe524
@ -663,7 +663,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
firstActive = DateTime.UtcNow;
|
firstActive = DateTime.UtcNow;
|
||||||
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
|
NativeMethods.HidD_SetNumInputBuffers(hDevice.safeReadHandle.DangerousGetHandle(), 2);
|
||||||
Queue<long> latencyQueue = new Queue<long>(31); // Set capacity at max + 1 to avoid any resizing
|
Queue<long> latencyQueue = new Queue<long>(21); // Set capacity at max + 1 to avoid any resizing
|
||||||
int tempLatencyCount = 0;
|
int tempLatencyCount = 0;
|
||||||
long oldtime = 0;
|
long oldtime = 0;
|
||||||
string currerror = string.Empty;
|
string currerror = string.Empty;
|
||||||
@ -687,7 +687,7 @@ namespace DS4Windows
|
|||||||
oldCharging = charging;
|
oldCharging = charging;
|
||||||
currerror = string.Empty;
|
currerror = string.Empty;
|
||||||
|
|
||||||
if (tempLatencyCount >= 30)
|
if (tempLatencyCount >= 20)
|
||||||
{
|
{
|
||||||
latencyQueue.Dequeue();
|
latencyQueue.Dequeue();
|
||||||
tempLatencyCount--;
|
tempLatencyCount--;
|
||||||
|
Loading…
Reference in New Issue
Block a user