Skip to content

Commit f331ad9

Browse files
increased buffer capacity for extremely high fps scenarios like E-sports titles
1 parent 7ee7f87 commit f331ad9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

source/CapFrameX.PresentMonInterface/OnlineMetricService.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ namespace CapFrameX.PresentMonInterface
1818
{
1919
public class OnlineMetricService : IOnlineMetricService
2020
{
21-
private const int LIST_CAPACITY = 20000;
22-
private const int PMD_BUFFER_CAPACITY = 2200;
21+
private const int LIST_CAPACITY = 30000;
22+
private const int PMD_BUFFER_CAPACITY = 3000;
2323
private const double FIVE_SECONDS_INTERVAL_LENGTH = 5.0;
2424
private const double ANIMATION_ERROR_INTERVAL_LENGTH = 0.5;
2525

@@ -586,6 +586,12 @@ public double GetOnlineAnimationErrorValue()
586586
}
587587
}
588588

589+
// Clamp to ±1000ms (1 second) to avoid extreme outliers
590+
if (!double.IsNaN(resultValue))
591+
{
592+
resultValue = Math.Max(-1000d, Math.Min(1000d, resultValue));
593+
}
594+
589595
return resultValue;
590596
}
591597
}

0 commit comments

Comments
 (0)