This commit is contained in:
TinyHerm committed 2026-11-24 23:40:08 +03:00
commit 1c7a8cf25f
579 files changed
+83196

No files matched your search

@@ -0,0 +1,21 @@
using System;
namespace VibranceHud.Theming;
public static class BackgroundFrameRate
{
public const int ComposeShare = 4;
public static int IntervalMs(double frameSeconds, double lastComposeMs, int slowestMs)
{
double num = Math.Max(frameSeconds, 1.0 / 30.0);
return IntervalMs(num, num, lastComposeMs, slowestMs);
}
public static int IntervalMs(double untilNextSeconds, double frameSeconds, double lastComposeMs, int slowestMs)
{
double num = Math.Max(frameSeconds, 1.0 / 30.0) * 1000.0;
double num2 = Math.Max(0.0, lastComposeMs) * 4.0;
return (int)Math.Clamp(Math.Round(Math.Max(0.0, untilNextSeconds) * 1000.0 + Math.Max(0.0, num2 - num)), 1.0, Math.Max(1, slowestMs));
}
}