mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-26 21:28:03 -05:00
game_list: Only reload game list after relevant settings changed
Prevents unnecessary reloads on every configuration operation.
This commit is contained in:
@ -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;
|
||||
@ -48,6 +58,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->icon_size_combobox->setCurrentIndex(
|
||||
|
@ -21,6 +21,8 @@ public:
|
||||
void applyConfiguration();
|
||||
|
||||
private:
|
||||
void RequestGameListUpdate();
|
||||
|
||||
void setConfiguration();
|
||||
|
||||
void changeEvent(QEvent*) override;
|
||||
|
@ -19,6 +19,9 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||
|
||||
this->setConfiguration();
|
||||
|
||||
connect(ui->toggle_deepscan, &QCheckBox::stateChanged, this,
|
||||
[] { UISettings::values.is_game_list_reload_pending.exchange(true); });
|
||||
|
||||
ui->use_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
}
|
||||
|
Reference in New Issue
Block a user