From 6f87bd0bc1d5fbb191e2fcdf41c1b904c6167f0a Mon Sep 17 00:00:00 2001 From: Andy Adshead Date: Wed, 30 Jan 2019 06:32:30 +0000 Subject: [PATCH] Better plage for frame swap flag, also kept enough flags to cover larger time spans --- Ryujinx.HLE/PerformanceStatistics.cs | 4 +++- Ryujinx.Profiler/InternalProfile.cs | 2 +- Ryujinx/Ui/GLScreen.cs | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ryujinx.HLE/PerformanceStatistics.cs b/Ryujinx.HLE/PerformanceStatistics.cs index 408e5d72ad..0071770f74 100644 --- a/Ryujinx.HLE/PerformanceStatistics.cs +++ b/Ryujinx.HLE/PerformanceStatistics.cs @@ -1,4 +1,5 @@ -using System.Diagnostics; +using Ryujinx.Profiler; +using System.Diagnostics; using System.Timers; namespace Ryujinx.HLE @@ -87,6 +88,7 @@ namespace Ryujinx.HLE public void RecordGameFrameTime() { RecordFrameTime(FrameTypeGame); + Profile.FlagTime(TimingFlagType.FrameSwap); } private void RecordFrameTime(int frameType) diff --git a/Ryujinx.Profiler/InternalProfile.cs b/Ryujinx.Profiler/InternalProfile.cs index 8dfeeb559a..0d64ef3b8c 100644 --- a/Ryujinx.Profiler/InternalProfile.cs +++ b/Ryujinx.Profiler/InternalProfile.cs @@ -28,7 +28,7 @@ namespace Ryujinx.Profiler private int _timingFlagCount; private int _timingFlagIndex; - private const int MaxFlags = 50; + private const int MaxFlags = 500; private Action _timingFlagCallback; diff --git a/Ryujinx/Ui/GLScreen.cs b/Ryujinx/Ui/GLScreen.cs index 0c842a186e..4cbbaf9a30 100644 --- a/Ryujinx/Ui/GLScreen.cs +++ b/Ryujinx/Ui/GLScreen.cs @@ -283,8 +283,6 @@ namespace Ryujinx _device.System.SignalVsync(); _device.VsyncEvent.Set(); - - Profile.FlagTime(TimingFlagType.FrameSwap); } protected override void OnUnload(EventArgs e)