summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/npad.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-07 23:54:05 +0200
committerGitHub <noreply@github.com>2020-10-07 23:54:05 +0200
commit92adb69fa7fa21d2f5e078e9473c0ea08e009a71 (patch)
treef4093ecf2ed67a34a1863a7ce383cb6b577ceda0 /src/core/hle/service/hid/controllers/npad.cpp
parentMerge pull request #4710 from Morph1984/fix-integrated-updates (diff)
parenthid: Stub HomeButtonInputProtection service commands (diff)
downloadyuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar.gz
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar.bz2
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar.lz
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar.xz
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.tar.zst
yuzu-92adb69fa7fa21d2f5e078e9473c0ea08e009a71.zip
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 a03af8df4..2de4ed348 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -846,6 +846,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;
}