From acb61a3cf28b0c403ec4423b9bdecef9833fb591 Mon Sep 17 00:00:00 2001 From: sonicfind <52436993+sonicfind@users.noreply.github.com> Date: Fri, 25 Sep 2020 20:20:49 -0500 Subject: [PATCH] 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. --- pcsx2/gui/AppMain.cpp | 6 +++++- pcsx2/gui/MainFrame.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pcsx2/gui/AppMain.cpp b/pcsx2/gui/AppMain.cpp index 67e807c47b..77e8deaf85 100644 --- a/pcsx2/gui/AppMain.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -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()); diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index e8991a04e9..e9ea6d52e7 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -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);