summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Morph2021-11-29 17:59:58 -0500
committerGravatar Morph2021-11-29 17:59:58 -0500
commit940375dfbbbb14480de042c96128aaded894e827 (patch)
treee632c135d30efad9c89f70e9ccf23a22df2121e5 /src
parentgeneral: Fix handheld typo (diff)
downloadyuzu-940375dfbbbb14480de042c96128aaded894e827.tar.gz
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.xz
yuzu-940375dfbbbb14480de042c96128aaded894e827.zip
core: hid: hid_core: Add (Enable/DIsable)AllControllerConfiguration
Diffstat (limited to 'src')
-rw-r--r--src/core/hid/hid_core.cpp26
-rw-r--r--src/core/hid/hid_core.h6
2 files changed, 32 insertions, 0 deletions
diff --git a/src/core/hid/hid_core.cpp b/src/core/hid/hid_core.cpp
index 741a69c3c..946adde00 100644
--- a/src/core/hid/hid_core.cpp
+++ b/src/core/hid/hid_core.cpp
@@ -135,6 +135,32 @@ NpadIdType HIDCore::GetFirstNpadId() const {
135 return NpadIdType::Player1; 135 return NpadIdType::Player1;
136} 136}
137 137
138void HIDCore::EnableAllControllerConfiguration() {
139 player_1->EnableConfiguration();
140 player_2->EnableConfiguration();
141 player_3->EnableConfiguration();
142 player_4->EnableConfiguration();
143 player_5->EnableConfiguration();
144 player_6->EnableConfiguration();
145 player_7->EnableConfiguration();
146 player_8->EnableConfiguration();
147 other->EnableConfiguration();
148 handheld->EnableConfiguration();
149}
150
151void HIDCore::DisableAllControllerConfiguration() {
152 player_1->DisableConfiguration();
153 player_2->DisableConfiguration();
154 player_3->DisableConfiguration();
155 player_4->DisableConfiguration();
156 player_5->DisableConfiguration();
157 player_6->DisableConfiguration();
158 player_7->DisableConfiguration();
159 player_8->DisableConfiguration();
160 other->DisableConfiguration();
161 handheld->DisableConfiguration();
162}
163
138void HIDCore::ReloadInputDevices() { 164void HIDCore::ReloadInputDevices() {
139 player_1->ReloadFromSettings(); 165 player_1->ReloadFromSettings();
140 player_2->ReloadFromSettings(); 166 player_2->ReloadFromSettings();
diff --git a/src/core/hid/hid_core.h b/src/core/hid/hid_core.h
index 609f40f3b..140a0e962 100644
--- a/src/core/hid/hid_core.h
+++ b/src/core/hid/hid_core.h
@@ -45,6 +45,12 @@ public:
45 /// Returns the first connected npad id 45 /// Returns the first connected npad id
46 NpadIdType GetFirstNpadId() const; 46 NpadIdType GetFirstNpadId() const;
47 47
48 /// Sets all emulated controllers into configuring mode.
49 void EnableAllControllerConfiguration();
50
51 /// Sets all emulated controllers into normal mode.
52 void DisableAllControllerConfiguration();
53
48 /// Reloads all input devices from settings 54 /// Reloads all input devices from settings
49 void ReloadInputDevices(); 55 void ReloadInputDevices();
50 56