summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-11-08 02:12:00 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-11-08 02:12:00 +0100
commit40db288a2a08b00eea9339fd61ce5f4a358dae8f (patch)
tree9b5a32d15b8397960eff8cf32362a0ae4263bcf3 /src
parentFixups (diff)
downloadyuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar.gz
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar.bz2
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar.lz
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar.xz
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.tar.zst
yuzu-40db288a2a08b00eea9339fd61ce5f4a358dae8f.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_general.cpp42
-rw-r--r--src/yuzu/configuration/configure_general.h2
2 files changed, 23 insertions, 21 deletions
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp
index 201d7a4c5..b322258a0 100644
--- a/src/yuzu/configuration/configure_general.cpp
+++ b/src/yuzu/configuration/configure_general.cpp
@@ -41,25 +41,27 @@ void ConfigureGeneral::PopulateHotkeyList(const HotkeyRegistry& registry) {
ui->widget->Populate(registry);
}
-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();
-
- // Message queue is shared between these services, we just need to signal an operation
- // change to one and it will handle both automatically
- auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
- auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");
- bool has_signalled = false;
-
- if (applet_oe != nullptr) {
- applet_oe->GetMessageQueue()->OperationModeChanged();
- has_signalled = true;
- }
-
- if (applet_ae != nullptr && !has_signalled) {
- applet_ae->GetMessageQueue()->OperationModeChanged();
- }
+void ConfigureGeneral::OnDockedModeChanged(bool last_state, bool new_state) {
+ if (last_state == new_state) {
+ return;
+ }
+
+ Core::System& system{Core::System::GetInstance()};
+ Service::SM::ServiceManager& sm = system.ServiceManager();
+
+ // Message queue is shared between these services, we just need to signal an operation
+ // change to one and it will handle both automatically
+ auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE");
+ auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE");
+ bool has_signalled = false;
+
+ if (applet_oe != nullptr) {
+ applet_oe->GetMessageQueue()->OperationModeChanged();
+ has_signalled = true;
+ }
+
+ if (applet_ae != nullptr && !has_signalled) {
+ applet_ae->GetMessageQueue()->OperationModeChanged();
}
}
@@ -72,7 +74,7 @@ void ConfigureGeneral::applyConfiguration() {
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);
+ OnDockedModeChanged(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 e4ce3c04c..2210d48da 100644
--- a/src/yuzu/configuration/configure_general.h
+++ b/src/yuzu/configuration/configure_general.h
@@ -25,7 +25,7 @@ public:
private:
void setConfiguration();
- void CheckIfOperationChanged(bool last_state, bool new_state);
+ void OnDockedModeChanged(bool last_state, bool new_state);
std::unique_ptr<Ui::ConfigureGeneral> ui;
};