mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-28 23:30:46 -05:00
Common: Make HookableEvent use non-static data.
Co-authored-by: Dentomologist <dentomologist@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user