From b97739029be5c4b06b8336ebf0a4b1f25db68647 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Sun, 29 Jul 2018 14:37:18 +0200 Subject: Port #3911 from Citra: "Optimize settings application" --- src/yuzu/configuration/configure_debug.cpp | 1 - src/yuzu/configuration/configure_general.cpp | 1 - src/yuzu/configuration/configure_graphics.cpp | 1 - src/yuzu/configuration/configure_input.cpp | 2 -- src/yuzu/main.cpp | 4 +++- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 5e66239ff..7fd07539a 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -44,5 +44,4 @@ void ConfigureDebug::applyConfiguration() { Log::Filter filter; filter.ParseFilterString(Settings::values.log_filter); Log::SetGlobalFilter(filter); - Settings::Apply(); } diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index baa558667..cb7d3f8bf 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -44,5 +44,4 @@ void ConfigureGeneral::applyConfiguration() { Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked(); Settings::values.use_multi_core = ui->use_multi_core->isChecked(); Settings::values.use_docked_mode = ui->use_docked_mode->isChecked(); - Settings::Apply(); } diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 7664880d5..3379b7963 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -67,5 +67,4 @@ void ConfigureGraphics::applyConfiguration() { ToResolutionFactor(static_cast(ui->resolution_factor_combobox->currentIndex())); Settings::values.toggle_framelimit = ui->toggle_framelimit->isChecked(); Settings::values.use_accurate_framebuffers = ui->use_accurate_framebuffers->isChecked(); - Settings::Apply(); } diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 78559e2bb..5e7badedf 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp @@ -191,8 +191,6 @@ void ConfigureInput::applyConfiguration() { [](const Common::ParamPackage& param) { return param.Serialize(); }); std::transform(analogs_param.begin(), analogs_param.end(), Settings::values.analogs.begin(), [](const Common::ParamPackage& param) { return param.Serialize(); }); - - Settings::Apply(); } void ConfigureInput::loadConfiguration() { diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 96998643e..809670c7a 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -723,10 +723,12 @@ void GMainWindow::ToggleWindowMode() { void GMainWindow::OnConfigure() { ConfigureDialog configureDialog(this); + auto old_theme = UISettings::values.theme; auto result = configureDialog.exec(); if (result == QDialog::Accepted) { configureDialog.applyConfiguration(); - UpdateUITheme(); + if (UISettings::values.theme != old_theme) + UpdateUITheme(); config->Save(); } } -- cgit v1.2.3