forked from suyu/suyu
Port #3911 from Citra: "Optimize settings application"
This commit is contained in:
parent
458fdda700
commit
b97739029b
5 changed files with 3 additions and 6 deletions
|
@ -44,5 +44,4 @@ void ConfigureDebug::applyConfiguration() {
|
||||||
Log::Filter filter;
|
Log::Filter filter;
|
||||||
filter.ParseFilterString(Settings::values.log_filter);
|
filter.ParseFilterString(Settings::values.log_filter);
|
||||||
Log::SetGlobalFilter(filter);
|
Log::SetGlobalFilter(filter);
|
||||||
Settings::Apply();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,5 +44,4 @@ void ConfigureGeneral::applyConfiguration() {
|
||||||
Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked();
|
Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked();
|
||||||
Settings::values.use_multi_core = ui->use_multi_core->isChecked();
|
Settings::values.use_multi_core = ui->use_multi_core->isChecked();
|
||||||
Settings::values.use_docked_mode = ui->use_docked_mode->isChecked();
|
Settings::values.use_docked_mode = ui->use_docked_mode->isChecked();
|
||||||
Settings::Apply();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,5 +67,4 @@ void ConfigureGraphics::applyConfiguration() {
|
||||||
ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex()));
|
ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex()));
|
||||||
Settings::values.toggle_framelimit = ui->toggle_framelimit->isChecked();
|
Settings::values.toggle_framelimit = ui->toggle_framelimit->isChecked();
|
||||||
Settings::values.use_accurate_framebuffers = ui->use_accurate_framebuffers->isChecked();
|
Settings::values.use_accurate_framebuffers = ui->use_accurate_framebuffers->isChecked();
|
||||||
Settings::Apply();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,6 @@ void ConfigureInput::applyConfiguration() {
|
||||||
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
||||||
std::transform(analogs_param.begin(), analogs_param.end(), Settings::values.analogs.begin(),
|
std::transform(analogs_param.begin(), analogs_param.end(), Settings::values.analogs.begin(),
|
||||||
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
||||||
|
|
||||||
Settings::Apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureInput::loadConfiguration() {
|
void ConfigureInput::loadConfiguration() {
|
||||||
|
|
|
@ -723,10 +723,12 @@ void GMainWindow::ToggleWindowMode() {
|
||||||
|
|
||||||
void GMainWindow::OnConfigure() {
|
void GMainWindow::OnConfigure() {
|
||||||
ConfigureDialog configureDialog(this);
|
ConfigureDialog configureDialog(this);
|
||||||
|
auto old_theme = UISettings::values.theme;
|
||||||
auto result = configureDialog.exec();
|
auto result = configureDialog.exec();
|
||||||
if (result == QDialog::Accepted) {
|
if (result == QDialog::Accepted) {
|
||||||
configureDialog.applyConfiguration();
|
configureDialog.applyConfiguration();
|
||||||
UpdateUITheme();
|
if (UISettings::values.theme != old_theme)
|
||||||
|
UpdateUITheme();
|
||||||
config->Save();
|
config->Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue