Fix regression when recording multiple fifologs
Sinceccf92a3e56
, recording fifologs multiple times after launching dolphin caused all initial state to not be saved (the initial contents of bpmem, cpmem, etc were all zeroed out). For some games, this was not noticeable, as most registers were set each frame, but for others, this resulted in completely broken fifologs. (Note that recording fifologs also required05181f6b88
and9e0755a598
to be cherry-picked due to other, since fixed, regressions.) This was because previously, `Renderer::CheckFifoRecording` was called every frame, butccf92a3e56
changed it into a callback (`m_end_of_frame_event`) that was removed when recording ended. Thus, before, `OpcodeDecoder::g_record_fifo_data = IsRecording()` was called when `IsRecording()` returned false, but after that commit `g_record_fifo_data` never got changed back to false, so the check for `was_recording` only ever passed on the first fifolog recorded (even after stopping and starting a game). There may still be another issue lurking, as I'm not sure if all broken fifologs were caused by recording multiple fifologs (for instance, on https://bugs.dolphin-emu.org/issues/13377, only one fifolog was initially uploaded, but it was affected by an issue with the same symptoms as this).
This commit is contained in:
parent
220988d064
commit
35831f342e
|
@ -261,7 +261,11 @@ void FifoRecorder::StartRecording(s32 numFrames, CallbackFunc finishedCb)
|
|||
OpcodeDecoder::g_record_fifo_data = IsRecording();
|
||||
|
||||
if (!OpcodeDecoder::g_record_fifo_data)
|
||||
{
|
||||
// Remove this frame end callback when recording finishes
|
||||
m_end_of_frame_event.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!was_recording)
|
||||
{
|
||||
|
@ -430,9 +434,6 @@ void FifoRecorder::EndFrame(u32 fifoStart, u32 fifoEnd)
|
|||
m_SkipFutureData = true;
|
||||
// Signal video backend that it should not call this function when the next frame ends
|
||||
m_IsRecording = false;
|
||||
|
||||
// Remove our frame end callback
|
||||
m_end_of_frame_event.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue