Merge pull request #8976 from JosJuice/port-some-settings

Port some settings to the new config system
This commit is contained in:
LC
2020-09-07 22:37:46 -04:00
committed by GitHub
15 changed files with 68 additions and 68 deletions

View File

@ -19,6 +19,7 @@
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
#include "Core/Config/MainSettings.h"
#include "Core/Config/UISettings.h"
#include "Core/ConfigManager.h"
@ -229,8 +230,8 @@ void InterfacePane::LoadConfig()
// Render Window Options
m_checkbox_top_window->setChecked(Settings::Instance().IsKeepWindowOnTopEnabled());
m_checkbox_confirm_on_stop->setChecked(startup_params.bConfirmStop);
m_checkbox_use_panic_handlers->setChecked(startup_params.bUsePanicHandlers);
m_checkbox_enable_osd->setChecked(startup_params.bOnScreenDisplayMessages);
m_checkbox_use_panic_handlers->setChecked(Config::Get(Config::MAIN_USE_PANIC_HANDLERS));
m_checkbox_enable_osd->setChecked(Config::Get(Config::MAIN_OSD_MESSAGES));
m_checkbox_show_active_title->setChecked(startup_params.m_show_active_title);
m_checkbox_pause_on_focus_lost->setChecked(startup_params.m_PauseOnFocusLost);
m_checkbox_use_covers->setChecked(Config::Get(Config::MAIN_USE_GAME_COVERS));
@ -254,12 +255,12 @@ void InterfacePane::OnSaveConfig()
// Render Window Options
Settings::Instance().SetKeepWindowOnTop(m_checkbox_top_window->isChecked());
settings.bConfirmStop = m_checkbox_confirm_on_stop->isChecked();
settings.bUsePanicHandlers = m_checkbox_use_panic_handlers->isChecked();
settings.bOnScreenDisplayMessages = m_checkbox_enable_osd->isChecked();
Config::SetBase(Config::MAIN_USE_PANIC_HANDLERS, m_checkbox_use_panic_handlers->isChecked());
Config::SetBase(Config::MAIN_OSD_MESSAGES, m_checkbox_enable_osd->isChecked());
settings.m_show_active_title = m_checkbox_show_active_title->isChecked();
settings.m_PauseOnFocusLost = m_checkbox_pause_on_focus_lost->isChecked();
Common::SetEnableAlert(settings.bUsePanicHandlers);
Common::SetEnableAlert(Config::Get(Config::MAIN_USE_PANIC_HANDLERS));
auto new_language = m_combobox_language->currentData().toString().toStdString();
if (new_language != SConfig::GetInstance().m_InterfaceLanguage)

View File

@ -16,7 +16,7 @@
#include "Common/FileUtil.h"
#include "Core/Config/MainSettings.h"
#include "Core/ConfigManager.h"
#include "Core/Config/UISettings.h"
#include "DolphinQt/Settings.h"
#include "DolphinQt/Settings/PathPane.h"
@ -148,7 +148,7 @@ QGroupBox* PathPane::MakeGameFolderBox()
m_remove_path->setEnabled(false);
auto* recursive_checkbox = new QCheckBox(tr("Search Subfolders"));
recursive_checkbox->setChecked(SConfig::GetInstance().m_RecursiveISOFolder);
recursive_checkbox->setChecked(Config::Get(Config::MAIN_RECURSIVE_ISO_PATHS));
auto* auto_checkbox = new QCheckBox(tr("Check for Game List Changes in the Background"));
auto_checkbox->setChecked(Settings::Instance().IsAutoRefreshEnabled());
@ -160,7 +160,7 @@ QGroupBox* PathPane::MakeGameFolderBox()
vlayout->addWidget(auto_checkbox);
connect(recursive_checkbox, &QCheckBox::toggled, [](bool checked) {
SConfig::GetInstance().m_RecursiveISOFolder = checked;
Config::SetBase(Config::MAIN_RECURSIVE_ISO_PATHS, checked);
Settings::Instance().RefreshGameList();
});