diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-05-03 02:48:44 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-11-02 17:30:43 -0600 |
| commit | f289b06e0db8bba6a3491d6e3cf0c2dd1b7a29fa (patch) | |
| tree | 4e95a04a656f571e4dc0a7024348d22c5a1c662e /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 9c28f19e56307ac4de750ffa6ffb8c4e15e55def (diff) | |
Common: Make HookableEvent use non-static data.
Co-authored-by: Dentomologist <dentomologist@gmail.com>
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 <algorithm> -#include <cmath> #include <cstring> #include <string> @@ -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. |
