feature: Turbo Mode

Adds an elapsed tick multiplier feature which speeds up games which are built upon delta time.
More information: https://web.archive.org/web/20240713135029/https://github.com/Ryujinx/Ryujinx/pull/6456
This commit is contained in:
Evan Husted
2025-03-03 02:33:28 -06:00
parent c48a2e6ba0
commit ed5cb82aa8
20 changed files with 394 additions and 26 deletions

View File

@@ -6,6 +6,8 @@ namespace Ryujinx.HLE
{
public class PerformanceStatistics
{
private readonly Switch _device;
private const int FrameTypeGame = 0;
private const int PercentTypeFifo = 0;
@@ -28,8 +30,10 @@ namespace Ryujinx.HLE
private readonly System.Timers.Timer _resetTimer;
public PerformanceStatistics()
public PerformanceStatistics(Switch device)
{
_device = device;
_frameRate = new double[1];
_accumulatedFrameTime = new double[1];
_previousFrameTime = new double[1];
@@ -166,8 +170,11 @@ namespace Ryujinx.HLE
{
double frameRate = GetGameFrameRate();
double frameTime = GetGameFrameTime();
string turboSuffix = _device.TurboMode
? $" Turbo ({_device.TickScalar}%)"
: string.Empty;
return $"{frameRate:00.00} FPS ({frameTime:00.00}ms)";
return $"{frameRate:00.00} FPS ({frameTime:00.00}ms){turboSuffix}";
}
public string FormatFifoPercent()