From 23b260113344ebe4be4dd906ec60d8a260cf50bb Mon Sep 17 00:00:00 2001 From: Chris Burgener Date: Fri, 19 Aug 2016 16:40:04 -0400 Subject: [PATCH] Fix advanced config panel staying disabled after TAS recording --- .../DolphinWX/Config/AdvancedConfigPane.cpp | 18 ++++++++++++++++++ .../Core/DolphinWX/Config/AdvancedConfigPane.h | 1 + Source/Core/DolphinWX/Config/ConfigMain.cpp | 2 -- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Config/AdvancedConfigPane.cpp b/Source/Core/DolphinWX/Config/AdvancedConfigPane.cpp index 4f9934fc39..9b663a3687 100644 --- a/Source/Core/DolphinWX/Config/AdvancedConfigPane.cpp +++ b/Source/Core/DolphinWX/Config/AdvancedConfigPane.cpp @@ -22,6 +22,7 @@ AdvancedConfigPane::AdvancedConfigPane(wxWindow* parent, wxWindowID id) : wxPane { InitializeGUI(); LoadGUIValues(); + RefreshGUI(); } void AdvancedConfigPane::InitializeGUI() @@ -208,3 +209,20 @@ void AdvancedConfigPane::UpdateCustomRTC(time_t date, time_t time) m_custom_rtc_date_picker->SetValue(custom_rtc); m_custom_rtc_time_picker->SetValue(custom_rtc); } + +void AdvancedConfigPane::RefreshGUI() +{ + // Don't allow users to edit the RTC while the game is running + if (Core::IsRunning()) + { + m_custom_rtc_checkbox->Disable(); + m_custom_rtc_date_picker->Disable(); + m_custom_rtc_time_picker->Disable(); + } + // Allow users to edit CPU clock speed in game, but not while needing determinism + if (Core::IsRunning() && Core::g_want_determinism) + { + m_clock_override_checkbox->Disable(); + m_clock_override_slider->Disable(); + } +} diff --git a/Source/Core/DolphinWX/Config/AdvancedConfigPane.h b/Source/Core/DolphinWX/Config/AdvancedConfigPane.h index 84b2e4e3f5..64296ef2f3 100644 --- a/Source/Core/DolphinWX/Config/AdvancedConfigPane.h +++ b/Source/Core/DolphinWX/Config/AdvancedConfigPane.h @@ -20,6 +20,7 @@ public: private: void InitializeGUI(); void LoadGUIValues(); + void RefreshGUI(); void OnClockOverrideCheckBoxChanged(wxCommandEvent&); void OnClockOverrideSliderChanged(wxCommandEvent&); diff --git a/Source/Core/DolphinWX/Config/ConfigMain.cpp b/Source/Core/DolphinWX/Config/ConfigMain.cpp index 72d6f421ed..32eb3963b3 100644 --- a/Source/Core/DolphinWX/Config/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Config/ConfigMain.cpp @@ -75,8 +75,6 @@ void CConfigMain::CreateGUIControls() Notebook->AddPage(wii_pane, _("Wii")); Notebook->AddPage(path_pane, _("Paths")); Notebook->AddPage(advanced_pane, _("Advanced")); - if (Core::g_want_determinism) - advanced_pane->Disable(); wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->Add(Notebook, 1, wxEXPAND | wxALL, 5);