mirror of https://github.com/PCSX2/pcsx2.git
recording: Don't reload cheats/settings on every frame-advance
I believe the intention of the cheats/settings reloading is for the conventional pause/resume from the MainFrame's menu. However, with input recording, nothing ever actually gets closed so I doubt the settings need to be reloaded. This stops that from happening on every individual frame advance. However, in case im wrong and it is needed, they do get re-applied when emulation is fully resumed (Shift+P by default). This just dramatically reduces the console spam.
This commit is contained in:
parent
8decc44476
commit
152d1d8ac4
|
@ -122,6 +122,11 @@ void InputRecordingControls::FrameAdvance()
|
|||
Resume();
|
||||
}
|
||||
|
||||
bool InputRecordingControls::IsFrameAdvancing()
|
||||
{
|
||||
return frameAdvancing;
|
||||
}
|
||||
|
||||
bool InputRecordingControls::IsPaused()
|
||||
{
|
||||
return (emulationCurrentlyPaused && CoreThread.IsOpen() && CoreThread.IsPaused());
|
||||
|
|
|
@ -39,6 +39,8 @@ public:
|
|||
|
||||
// Resume emulation (incase the emulation is currently paused) and pause after a single frame has passed
|
||||
void FrameAdvance();
|
||||
// Returns true if emulation is currently set up to frame advance.
|
||||
bool IsFrameAdvancing();
|
||||
// Returns true if the input recording has been paused, which can occur:
|
||||
// - After a single frame has passed after InputRecordingControls::FrameAdvance
|
||||
// - Explicitly paused via an InputRecordingControls function
|
||||
|
@ -51,7 +53,7 @@ public:
|
|||
void Resume();
|
||||
void SetFrameCountTracker(u32 newFrame);
|
||||
// Sets frameAdvancing variable to false
|
||||
// Used to restrict a frameAdvaceTravker value from transferring between recordings
|
||||
// Used to restrict a frameAdvanceTracker value from transferring between recordings
|
||||
void DisableFrameAdvance();
|
||||
// Alternates emulation between a paused and unpaused state
|
||||
void TogglePause();
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
#include "R5900Exceptions.h"
|
||||
#include "Sio.h"
|
||||
|
||||
#ifndef DISABLE_RECORDING
|
||||
#include "Recording/InputRecordingControls.h"
|
||||
#endif
|
||||
|
||||
__aligned16 SysMtgsThread mtgsThread;
|
||||
__aligned16 AppCoreThread CoreThread;
|
||||
|
||||
|
@ -208,8 +212,16 @@ void Pcsx2App::SysApplySettings()
|
|||
|
||||
void AppCoreThread::OnResumeReady()
|
||||
{
|
||||
#ifndef DISABLE_RECORDING
|
||||
if (!g_InputRecordingControls.IsFrameAdvancing())
|
||||
{
|
||||
wxGetApp().SysApplySettings();
|
||||
wxGetApp().PostMethod(AppSaveSettings);
|
||||
}
|
||||
#else
|
||||
wxGetApp().SysApplySettings();
|
||||
wxGetApp().PostMethod(AppSaveSettings);
|
||||
#endif
|
||||
|
||||
sApp.PostAppMethod(&Pcsx2App::leaveDebugMode);
|
||||
_parent::OnResumeReady();
|
||||
|
|
Loading…
Reference in New Issue