diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-01-31 21:16:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-31 21:16:21 +0100 |
| commit | da6b5dd38a9441fb550268bbb3f222d71457313b (patch) | |
| tree | c0215eff5768d36663e4abfbe52290fdcdc97d08 /Source/Core/VideoCommon/Statistics.cpp | |
| parent | 18abf7c768c715e4399bb68aec5d623633a1427f (diff) | |
| parent | 16d8b6e6b3af87e5d7684bf34ca79b765ff44d33 (diff) | |
Merge pull request #12546 from lioncash/event
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
Diffstat (limited to 'Source/Core/VideoCommon/Statistics.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Statistics.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 4103dbda3d..aea3b0e957 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -23,13 +23,12 @@ static Common::EventHook s_before_frame_event = BeforeFrameEvent::Register([] { g_stats.ResetFrame(); }, "Statistics::ResetFrame"); static Common::EventHook s_after_frame_event = AfterFrameEvent::Register( - [] { - DolphinAnalytics::PerformanceSample perf_sample; - perf_sample.speed_ratio = - Core::System::GetInstance().GetSystemTimers().GetEstimatedEmulationPerformance(); - perf_sample.num_prims = g_stats.this_frame.num_prims + g_stats.this_frame.num_dl_prims; - perf_sample.num_draw_calls = g_stats.this_frame.num_draw_calls; - DolphinAnalytics::Instance().ReportPerformanceInfo(std::move(perf_sample)); + [](const Core::System& system) { + DolphinAnalytics::Instance().ReportPerformanceInfo({ + .speed_ratio = system.GetSystemTimers().GetEstimatedEmulationPerformance(), + .num_prims = g_stats.this_frame.num_prims + g_stats.this_frame.num_dl_prims, + .num_draw_calls = g_stats.this_frame.num_draw_calls, + }); }, "Statistics::PerformanceSample"); |
