aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/hid/controllers/npad.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-09-30 06:34:08 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-09-30 06:38:24 -0400
commit6380731486e687a0a6b60ac3a1bd68812e538e66 (patch)
tree93dc8b22994aa26f9436f801113dd74156a44983 /src/core/hle/service/hid/controllers/npad.cpp
parent1ba0b077fc226382fcf581a5b02f655e365e5f27 (diff)
hid: Stub HomeButtonInputProtection service commands
- Used in 1-2 Switch. Given that we do not emulate the functionality of the home button yet, we can stub this for now.
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index e34ee519e..548517a1f 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -826,6 +826,15 @@ Controller_NPad::LedPattern Controller_NPad::GetLedPattern(u32 npad_id) {
}
}
+bool Controller_NPad::IsUnintendedHomeButtonInputProtectionEnabled(u32 npad_id) const {
+ return unintended_home_button_input_protection[NPadIdToIndex(npad_id)];
+}
+
+void Controller_NPad::SetUnintendedHomeButtonInputProtectionEnabled(bool is_protection_enabled,
+ u32 npad_id) {
+ unintended_home_button_input_protection[NPadIdToIndex(npad_id)] = is_protection_enabled;
+}
+
void Controller_NPad::SetVibrationEnabled(bool can_vibrate) {
can_controllers_vibrate = can_vibrate;
}