DolphinQt2: replace Settings with SConfig where possible

Changes:
- `ShowDevelopmentWarning` is now under the '[Interface]' group in
  Dolphin.ini, with other interface-related settings. So, whoever uses
  DolphinQt will have to edit that manually again. Sorry!
- Game search paths and the last file are now shared properly with
  DolphinWX
- Qt-only preferences like "Preferred View: list/table" are now
  stored using the platform's native settings storage, rather than in
  UI.ini
This commit is contained in:
Michael Maltese
2017-06-22 15:11:53 -07:00
parent 898bbffaa7
commit d0fdb9f149
16 changed files with 132 additions and 448 deletions

View File

@ -140,14 +140,13 @@ void GeneralPane::CreateAdvanced()
void GeneralPane::LoadConfig()
{
auto& settings = Settings::Instance();
m_checkbox_force_ntsc->setChecked(settings.GetForceNTSCJ());
m_checkbox_force_ntsc->setChecked(SConfig::GetInstance().bForceNTSCJ);
#if defined(USE_ANALYTICS) && USE_ANALYTICS
m_checkbox_enable_analytics->setChecked(settings.GetAnalyticsEnabled());
m_checkbox_enable_analytics->setChecked(SConfig::GetInstance().m_analytics_enabled);
#endif
m_checkbox_dualcore->setChecked(SConfig::GetInstance().bCPUThread);
m_checkbox_cheats->setChecked(SConfig::GetInstance().bEnableCheats);
int selection = qRound(settings.GetEmulationSpeed() * 10);
int selection = qRound(SConfig::GetInstance().m_EmulationSpeed * 10);
if (selection < m_combobox_speedlimit->count())
m_combobox_speedlimit->setCurrentIndex(selection);
m_checkbox_dualcore->setChecked(SConfig::GetInstance().bCPUThread);
@ -173,10 +172,9 @@ void GeneralPane::LoadConfig()
void GeneralPane::OnSaveConfig()
{
auto& settings = Settings::Instance();
settings.SetForceNTSCJ(m_checkbox_force_ntsc->isChecked());
SConfig::GetInstance().bForceNTSCJ = m_checkbox_force_ntsc->isChecked();
#if defined(USE_ANALYTICS) && USE_ANALYTICS
settings.SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked());
SConfig::GetInstance().m_analytics_enabled = m_checkbox_enable_analytics->isChecked();
#endif
SConfig::GetInstance().bCPUThread = m_checkbox_dualcore->isChecked();
SConfig::GetInstance().bEnableCheats = m_checkbox_cheats->isChecked();