summaryrefslogtreecommitdiffstats
path: root/src/core/hid
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-11-29 23:59:58 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-11-29 23:59:58 +0100
commit940375dfbbbb14480de042c96128aaded894e827 (patch)
treee632c135d30efad9c89f70e9ccf23a22df2121e5 /src/core/hid
parentgeneral: Fix handheld typo (diff)
downloadyuzu-940375dfbbbb14480de042c96128aaded894e827.tar
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.gz
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.bz2
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.lz
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.xz
yuzu-940375dfbbbb14480de042c96128aaded894e827.tar.zst
yuzu-940375dfbbbb14480de042c96128aaded894e827.zip
Diffstat (limited to 'src/core/hid')
-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 {
return NpadIdType::Player1;
}
+void HIDCore::EnableAllControllerConfiguration() {
+ player_1->EnableConfiguration();
+ player_2->EnableConfiguration();
+ player_3->EnableConfiguration();
+ player_4->EnableConfiguration();
+ player_5->EnableConfiguration();
+ player_6->EnableConfiguration();
+ player_7->EnableConfiguration();
+ player_8->EnableConfiguration();
+ other->EnableConfiguration();
+ handheld->EnableConfiguration();
+}
+
+void HIDCore::DisableAllControllerConfiguration() {
+ player_1->DisableConfiguration();
+ player_2->DisableConfiguration();
+ player_3->DisableConfiguration();
+ player_4->DisableConfiguration();
+ player_5->DisableConfiguration();
+ player_6->DisableConfiguration();
+ player_7->DisableConfiguration();
+ player_8->DisableConfiguration();
+ other->DisableConfiguration();
+ handheld->DisableConfiguration();
+}
+
void HIDCore::ReloadInputDevices() {
player_1->ReloadFromSettings();
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:
/// Returns the first connected npad id
NpadIdType GetFirstNpadId() const;
+ /// Sets all emulated controllers into configuring mode.
+ void EnableAllControllerConfiguration();
+
+ /// Sets all emulated controllers into normal mode.
+ void DisableAllControllerConfiguration();
+
/// Reloads all input devices from settings
void ReloadInputDevices();