summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2024-01-31 13:12:06 -0500
committerLioncash <mai.iam2048@gmail.com>2024-01-31 13:12:09 -0500
commitcac66317aa715a3d9fcfe39ccbe5d224ca489637 (patch)
tree6f6d74c13e0ccf308807dee82fa0ca6ec8e93374 /Source/Core/VideoCommon/VertexManagerBase.cpp
parent30fdf25f8f3a2fd217c8c39eb3abb5b55f63b510 (diff)
VideoCommon/Statistics: Remove global system accessor from s_after_frame_event
Instead, we make the event take a reference to the system and then pass it in when the event is triggered. This does introduce two other accessors, but these are much easier to refactor out over time, and without modification to the existing event interface.
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 1309ea4a47..94d609c23f 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -117,9 +117,11 @@ VertexManagerBase::~VertexManagerBase() = default;
bool VertexManagerBase::Initialize()
{
- m_frame_end_event = AfterFrameEvent::Register([this] { OnEndFrame(); }, "VertexManagerBase");
+ m_frame_end_event =
+ AfterFrameEvent::Register([this](Core::System&) { OnEndFrame(); }, "VertexManagerBase");
m_after_present_event = AfterPresentEvent::Register(
- [this](PresentInfo& pi) { m_ticks_elapsed = pi.emulated_timestamp; }, "VertexManagerBase");
+ [this](const PresentInfo& pi) { m_ticks_elapsed = pi.emulated_timestamp; },
+ "VertexManagerBase");
m_index_generator.Init();
m_custom_shader_cache = std::make_unique<CustomShaderCache>();
m_cpu_cull.Init();