From 99f8d2fa84378713fac57bb7db506c49ee5b683f Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Tue, 29 Dec 2020 18:19:27 -0500 Subject: [PATCH] input-rec: Update the GS Frame's freq. properly on enabling/disabling --- pcsx2/gui/FrameForGS.cpp | 14 ++++++++++---- pcsx2/gui/GSFrame.h | 1 + pcsx2/gui/MainMenuClicks.cpp | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index b6139efac0..18636fa8bf 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -589,8 +589,7 @@ bool GSFrame::ShowFullScreen(bool show, bool updateConfig) return retval; } - -void GSFrame::CoreThread_OnResumed() +void GSFrame::UpdateTitleUpdateFreq() { #ifndef DISABLE_RECORDING if (g_Conf->EmuOptions.EnableRecordingTools) @@ -604,8 +603,15 @@ void GSFrame::CoreThread_OnResumed() #else m_timer_UpdateTitle.Start(TitleBarUpdateMs); #endif - - if( !IsShown() ) Show(); +} + +void GSFrame::CoreThread_OnResumed() +{ + UpdateTitleUpdateFreq(); + if (!IsShown()) + { + Show(); + } } void GSFrame::CoreThread_OnSuspended() diff --git a/pcsx2/gui/GSFrame.h b/pcsx2/gui/GSFrame.h index 8569908b4d..0591d5b611 100644 --- a/pcsx2/gui/GSFrame.h +++ b/pcsx2/gui/GSFrame.h @@ -107,6 +107,7 @@ public: bool Show( bool shown=true ); bool ShowFullScreen(bool show, bool updateConfig = true); + void UpdateTitleUpdateFreq(); protected: void OnCloseWindow( wxCloseEvent& evt ); diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index 41e1c94f3a..b2ac8244ae 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -631,6 +631,11 @@ void MainEmuFrame::Menu_EnableRecordingTools_Click(wxCommandEvent& event) } g_Conf->EmuOptions.EnableRecordingTools = checked; + // Update GS Title Frequency + if (GSFrame* gsFrame = wxGetApp().GetGsFramePtr()) + { + gsFrame->UpdateTitleUpdateFreq(); + } // Enable Recording Logs ConsoleLogFrame* progLog = wxGetApp().GetProgramLog(); progLog->UpdateLogList();