recording: Disable create & play options until a game is loaded at least once

Ensures no frames are skipped on an initial load of a input recording before booting a game first.
This commit is contained in:
sonicfind 2020-09-25 20:20:49 -05:00 committed by refractionpcsx2
parent 3f359147c8
commit acb61a3cf2
2 changed files with 7 additions and 3 deletions

View File

@ -1025,7 +1025,11 @@ void Pcsx2App::OpenGsPanel()
gsFrame->ShowFullScreen( g_Conf->GSWindow.IsFullscreen );
#ifndef DISABLE_RECORDING
// Disable recording controls that only make sense if the game is running
// Enable New & Play after the first game load of the session
sMainFrame.enableRecordingMenuItem(MenuId_Recording_New, !g_InputRecording.IsActive());
sMainFrame.enableRecordingMenuItem(MenuId_Recording_Play, true);
// Enable recording menu options as the game is now running
sMainFrame.enableRecordingMenuItem(MenuId_Recording_FrameAdvance, true);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_TogglePause, true);
sMainFrame.enableRecordingMenuItem(MenuId_Recording_ToggleRecordingMode, g_InputRecording.IsActive());

View File

@ -486,9 +486,9 @@ void MainEmuFrame::CreateCaptureMenu()
void MainEmuFrame::CreateRecordMenu()
{
#ifndef DISABLE_RECORDING
m_menuRecording.Append(MenuId_Recording_New, _("New"), _("Create a new input recording."));
m_menuRecording.Append(MenuId_Recording_New, _("New"), _("Create a new input recording."))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Stop, _("Stop"), _("Stop the active input recording."))->Enable(false);
m_menuRecording.Append(MenuId_Recording_Play, _("Play"), _("Playback an existing input recording."));
m_menuRecording.Append(MenuId_Recording_Play, _("Play"), _("Playback an existing input recording."))->Enable(false);
m_menuRecording.AppendSeparator();
m_menuRecording.Append(MenuId_Recording_TogglePause, _("Toggle Pause"), _("Pause or resume emulation on the fly."))->Enable(false);
m_menuRecording.Append(MenuId_Recording_FrameAdvance, _("Frame Advance"), _("Advance emulation forward by a single frame at a time."))->Enable(false);