mirror of https://github.com/PCSX2/pcsx2.git
recorrding: Resolve issues with starting a new file
This commit is contained in:
parent
23dba26ba3
commit
9936fc7f15
|
@ -64,7 +64,7 @@ void InputRecording::RecordingReset()
|
|||
else if (g_InputRecording.IsActive())
|
||||
{
|
||||
g_InputRecording.SetFrameCounter(0);
|
||||
g_InputRecordingControls.Lock(0, false);
|
||||
g_InputRecordingControls.Lock(0);
|
||||
}
|
||||
else
|
||||
g_InputRecordingControls.Resume();
|
||||
|
@ -227,7 +227,7 @@ void InputRecording::SetStartingFrame(u32 newStartingFrame)
|
|||
recordingConLog(wxString::Format(L"[REC]: Internal Starting Frame: %d\n", startingFrame));
|
||||
frameCounter = 0;
|
||||
initialLoad = false;
|
||||
g_InputRecordingControls.Lock(startingFrame, inputRecordingData.FromSaveState());
|
||||
g_InputRecordingControls.Lock(startingFrame);
|
||||
}
|
||||
|
||||
void InputRecording::Stop()
|
||||
|
|
|
@ -41,17 +41,18 @@ void InputRecordingControls::HandleFrameAdvanceAndPausing()
|
|||
// has completed - signaled when g_framecount and frameCountTracker are equal.
|
||||
if (frameLock)
|
||||
{
|
||||
if (!emulationCurrentlyPaused && CoreThread.IsOpen() && CoreThread.IsRunning())
|
||||
{
|
||||
pauseEmulation = true;
|
||||
emulationCurrentlyPaused = true;
|
||||
CoreThread.PauseSelf();
|
||||
}
|
||||
else if (g_FrameCount == frameCountTracker)
|
||||
if (g_FrameCount == frameCountTracker)
|
||||
{
|
||||
frameLock = false;
|
||||
g_InputRecordingControls.Resume();
|
||||
}
|
||||
else if (!emulationCurrentlyPaused && CoreThread.IsOpen() && CoreThread.IsRunning())
|
||||
{
|
||||
pauseEmulation = true;
|
||||
resumeEmulation = false;
|
||||
emulationCurrentlyPaused = true;
|
||||
CoreThread.PauseSelf();
|
||||
}
|
||||
return;
|
||||
}
|
||||
// As a safeguard, use the global g_FrameCount to know when the frame counter has truly changed.
|
||||
|
@ -188,12 +189,13 @@ void InputRecordingControls::RecordModeToggle()
|
|||
switchToReplay = true;
|
||||
}
|
||||
|
||||
void InputRecordingControls::Lock(u32 frame, bool savestate)
|
||||
void InputRecordingControls::Lock(u32 frame)
|
||||
{
|
||||
frameLock = true;
|
||||
frameCountTracker = frame;
|
||||
resumeEmulation = false;
|
||||
//Ensures that g_frameCount can be used to resume emulation after a fast/full boot
|
||||
if (!savestate)
|
||||
if (!g_InputRecording.GetInputRecordingData().FromSaveState())
|
||||
g_FrameCount = frame + 1;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
// Enables the frame locking mechanism so that when recordings are loaded
|
||||
// or when processing a reboot with a recording active that no frames are
|
||||
// lost in prior emulation
|
||||
void Lock(u32 frame, bool savestate);
|
||||
void Lock(u32 frame);
|
||||
|
||||
private:
|
||||
// Indicates if the input recording controls have explicitly paused emulation or not
|
||||
|
|
|
@ -893,8 +893,6 @@ void MainEmuFrame::Menu_Recording_New_Click(wxCommandEvent &event)
|
|||
}
|
||||
m_menuRecording.FindChildItem(MenuId_Recording_New)->Enable(false);
|
||||
m_menuRecording.FindChildItem(MenuId_Recording_Stop)->Enable(true);
|
||||
if (!g_InputRecording.GetInputRecordingData().FromSaveState())
|
||||
g_InputRecordingControls.Resume();
|
||||
}
|
||||
|
||||
void MainEmuFrame::Menu_Recording_Play_Click(wxCommandEvent &event)
|
||||
|
|
Loading…
Reference in New Issue