From f289b06e0db8bba6a3491d6e3cf0c2dd1b7a29fa Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 3 May 2025 02:48:44 -0500 Subject: Common: Make HookableEvent use non-static data. Co-authored-by: Dentomologist --- Source/Core/VideoCommon/BPStructs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/BPStructs.cpp') diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index dd0cd59570..1ece9f278e 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -4,7 +4,6 @@ #include "VideoCommon/BPStructs.h" #include -#include #include #include @@ -341,6 +340,8 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager& false, false, yScale, s_gammaLUT[PE_copy.gamma], bpmem.triggerEFBCopy.clamp_top, bpmem.triggerEFBCopy.clamp_bottom, bpmem.copyfilter.GetCoefficients()); + auto& system = Core::System::GetInstance(); + // This is as closest as we have to an "end of the frame" // It works 99% of the time. // But sometimes games want to render an XFB larger than the EFB's 640x528 pixel resolution @@ -348,7 +349,7 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager& // render multiple sub-frames and arrange the XFB copies in next to each-other in main memory // so they form a single completed XFB. // See https://dolphin-emu.org/blog/2017/11/19/hybridxfb/ for examples and more detail. - AfterFrameEvent::Trigger(Core::System::GetInstance()); + system.GetVideoEvents().after_frame_event.Trigger(system); // Note: Theoretically, in the future we could track the VI configuration and try to detect // when an XFB is the last XFB copy of a frame. Not only would we get a clean "end of @@ -356,7 +357,6 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager& // Might also clean up some issues with games doing XFB copies they don't intend to // display. - auto& system = Core::System::GetInstance(); if (g_ActiveConfig.bImmediateXFB) { // TODO: GetTicks is not sane from the GPU thread. -- cgit v1.2.3