Disable changing Custom RTC when game is running

This commit is contained in:
Chris Burgener
2016-07-19 14:21:29 -04:00
parent cac9516e39
commit 80ac4a359d
4 changed files with 23 additions and 17 deletions

View File

@ -15,6 +15,7 @@
#include <wx/timectrl.h>
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "DolphinWX/Config/AdvancedConfigPane.h"
AdvancedConfigPane::AdvancedConfigPane(wxWindow* parent, wxWindowID id) : wxPanel(parent, id)
@ -186,8 +187,17 @@ void AdvancedConfigPane::LoadCustomRTC()
else
m_custom_rtc_date_picker->SetRange(wxDateTime(1, wxDateTime::Jan, 2000),
wxDateTime(31, wxDateTime::Dec, 2099));
m_custom_rtc_date_picker->Enable(custom_rtc_enabled);
m_custom_rtc_time_picker->Enable(custom_rtc_enabled);
if (Core::IsRunning())
{
m_custom_rtc_checkbox->Enable(false);
m_custom_rtc_date_picker->Enable(false);
m_custom_rtc_time_picker->Enable(false);
}
else
{
m_custom_rtc_date_picker->Enable(custom_rtc_enabled);
m_custom_rtc_time_picker->Enable(custom_rtc_enabled);
}
}
void AdvancedConfigPane::UpdateCustomRTC(time_t date, time_t time)