summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_gamelist.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-18 19:24:53 -0800
committerGitHub <noreply@github.com>2018-11-18 19:24:53 -0800
commit3e93c306307f2318184c276fa6a956e35ac27f21 (patch)
tree76f149debbe12a0173f4257b15b3f9081eda1b26 /src/yuzu/configuration/configure_gamelist.cpp
parente34d47e6e36f5c99211d0382eded6dbb78ed805e (diff)
parent52e7e8eed3daee0de13f7ab114c87cedd3e2a46b (diff)
Merge pull request #1640 from DarkLordZach/game-list-reload
game_list: Only reload game list after relevant settings changed
Diffstat (limited to 'src/yuzu/configuration/configure_gamelist.cpp')
-rw-r--r--src/yuzu/configuration/configure_gamelist.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_gamelist.cpp b/src/yuzu/configuration/configure_gamelist.cpp
index 639d5df0f..ae8cac243 100644
--- a/src/yuzu/configuration/configure_gamelist.cpp
+++ b/src/yuzu/configuration/configure_gamelist.cpp
@@ -36,6 +36,16 @@ ConfigureGameList::ConfigureGameList(QWidget* parent)
InitializeRowComboBoxes();
this->setConfiguration();
+
+ // Force game list reload if any of the relevant settings are changed.
+ connect(ui->show_unknown, &QCheckBox::stateChanged, this,
+ &ConfigureGameList::RequestGameListUpdate);
+ connect(ui->icon_size_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
+ &ConfigureGameList::RequestGameListUpdate);
+ connect(ui->row_1_text_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
+ &ConfigureGameList::RequestGameListUpdate);
+ connect(ui->row_2_text_combobox, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
+ &ConfigureGameList::RequestGameListUpdate);
}
ConfigureGameList::~ConfigureGameList() = default;
@@ -49,6 +59,10 @@ void ConfigureGameList::applyConfiguration() {
Settings::Apply();
}
+void ConfigureGameList::RequestGameListUpdate() {
+ UISettings::values.is_game_list_reload_pending.exchange(true);
+}
+
void ConfigureGameList::setConfiguration() {
ui->show_unknown->setChecked(UISettings::values.show_unknown);
ui->show_add_ons->setChecked(UISettings::values.show_add_ons);