diff options
| author | Lioncash <mai.iam2048@gmail.com> | 2024-01-31 13:12:06 -0500 |
|---|---|---|
| committer | Lioncash <mai.iam2048@gmail.com> | 2024-01-31 13:12:09 -0500 |
| commit | cac66317aa715a3d9fcfe39ccbe5d224ca489637 (patch) | |
| tree | 6f6d74c13e0ccf308807dee82fa0ca6ec8e93374 /Source/Core/VideoCommon/GraphicsModSystem/Runtime | |
| parent | 30fdf25f8f3a2fd217c8c39eb3abb5b55f63b510 (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/GraphicsModSystem/Runtime')
| -rw-r--r-- | Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomShaderCache.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomShaderCache.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomShaderCache.cpp index cd871b5833..de68bffa63 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomShaderCache.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomShaderCache.cpp @@ -16,8 +16,8 @@ CustomShaderCache::CustomShaderCache() m_async_uber_shader_compiler = g_gfx->CreateAsyncShaderCompiler(); m_async_uber_shader_compiler->StartWorkerThreads(1); // TODO - m_frame_end_handler = - AfterFrameEvent::Register([this] { RetrieveAsyncShaders(); }, "RetreiveAsyncShaders"); + m_frame_end_handler = AfterFrameEvent::Register([this](Core::System&) { RetrieveAsyncShaders(); }, + "RetrieveAsyncShaders"); } CustomShaderCache::~CustomShaderCache() diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp index 01e7a07033..4ddd2d1d72 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp @@ -95,7 +95,8 @@ bool GraphicsModManager::Initialize() g_ActiveConfig.graphics_mod_config->SetChangeCount(old_game_mod_changes); g_graphics_mod_manager->Load(*g_ActiveConfig.graphics_mod_config); - m_end_of_frame_event = AfterFrameEvent::Register([this] { EndOfFrame(); }, "ModManager"); + m_end_of_frame_event = + AfterFrameEvent::Register([this](Core::System&) { EndOfFrame(); }, "ModManager"); } return true; |
