summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.h2
-rw-r--r--src/yuzu/configuration/configure_general.cpp26
-rw-r--r--src/yuzu/configuration/configure_general.h1
3 files changed, 17 insertions, 12 deletions
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 4b650ee0b..2f1c20bce 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -60,7 +60,7 @@ public:
void OperationModeChanged();
private:
- std::queue<AppletMessage> messages{};
+ std::queue<AppletMessage> messages;
Kernel::SharedPtr<Kernel::Event> on_new_message;
Kernel::SharedPtr<Kernel::Event> on_operation_mode_changed;
};
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp
index 9b429c346..201d7a4c5 100644
--- a/src/yuzu/configuration/configure_general.cpp
+++ b/src/yuzu/configuration/configure_general.cpp
@@ -41,17 +41,8 @@ void ConfigureGeneral::PopulateHotkeyList(const HotkeyRegistry& registry) {
ui->widget->Populate(registry);
}
-void ConfigureGeneral::applyConfiguration() {
- UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked();
- UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
- UISettings::values.theme =
- ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
-
- Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked();
- const bool pre_docked_mode = Settings::values.use_docked_mode;
- Settings::values.use_docked_mode = ui->use_docked_mode->isChecked();
-
- if (pre_docked_mode != Settings::values.use_docked_mode) {
+void ConfigureGeneral::CheckIfOperationChanged(bool last_state, bool new_state) {
+ if (last_state != new_state) {
Core::System& system{Core::System::GetInstance()};
Service::SM::ServiceManager& sm = system.ServiceManager();
@@ -70,5 +61,18 @@ void ConfigureGeneral::applyConfiguration() {
applet_ae->GetMessageQueue()->OperationModeChanged();
}
}
+}
+
+void ConfigureGeneral::applyConfiguration() {
+ UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked();
+ UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
+ UISettings::values.theme =
+ ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString();
+
+ Settings::values.use_cpu_jit = ui->use_cpu_jit->isChecked();
+ const bool pre_docked_mode = Settings::values.use_docked_mode;
+ Settings::values.use_docked_mode = ui->use_docked_mode->isChecked();
+ CheckIfOperationChanged(pre_docked_mode, Settings::values.use_docked_mode);
+
Settings::values.enable_nfc = ui->enable_nfc->isChecked();
}
diff --git a/src/yuzu/configuration/configure_general.h b/src/yuzu/configuration/configure_general.h
index 4770034cc..e4ce3c04c 100644
--- a/src/yuzu/configuration/configure_general.h
+++ b/src/yuzu/configuration/configure_general.h
@@ -25,6 +25,7 @@ public:
private:
void setConfiguration();
+ void CheckIfOperationChanged(bool last_state, bool new_state);
std::unique_ptr<Ui::ConfigureGeneral> ui;
};