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.
This commit is contained in:
1 parent
30fdf25f8f
commit
cac66317aa
14 files changed
+35
-26
No files matched your search
@@ -256,7 +256,7 @@ void FifoRecorder::StartRecording(s32 numFrames, CallbackFunc finishedCb)
|
||||
m_FinishedCb = finishedCb;
|
||||
|
||||
m_end_of_frame_event = AfterFrameEvent::Register(
|
||||
[this] {
|
||||
[this](const Core::System& system) {
|
||||
const bool was_recording = OpcodeDecoder::g_record_fifo_data;
|
||||
OpcodeDecoder::g_record_fifo_data = IsRecording();
|
||||
|
||||
@@ -272,7 +272,7 @@ void FifoRecorder::StartRecording(s32 numFrames, CallbackFunc finishedCb)
|
||||
RecordInitialVideoMemory();
|
||||
}
|
||||
|
||||
const auto& fifo = m_system.GetCommandProcessor().GetFifo();
|
||||
const auto& fifo = system.GetCommandProcessor().GetFifo();
|
||||
EndFrame(fifo.CPBase.load(std::memory_order_relaxed),
|
||||
fifo.CPEnd.load(std::memory_order_relaxed));
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user