diff options
Diffstat (limited to 'src/hid_core')
-rw-r--r-- | src/hid_core/resources/npad/npad.cpp | 10 | ||||
-rw-r--r-- | src/hid_core/resources/npad/npad.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index 6be6edb7e..2995634c5 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp @@ -1368,4 +1368,14 @@ Result NPad::SetNpadSystemExtStateEnabled(u64 aruid, bool is_enabled) { return result; } +Result NPad::AssigningSingleOnSlSrPress(u64 aruid, bool is_enabled) { + std::scoped_lock lock{mutex}; + bool is_currently_enabled{}; + Result result = npad_resource.IsAssigningSingleOnSlSrPressEnabled(is_currently_enabled, aruid); + if (result.IsSuccess() && is_enabled != is_currently_enabled) { + result = npad_resource.SetAssigningSingleOnSlSrPress(aruid, is_enabled); + } + return result; +} + } // namespace Service::HID diff --git a/src/hid_core/resources/npad/npad.h b/src/hid_core/resources/npad/npad.h index 73e2780c4..91bc59afd 100644 --- a/src/hid_core/resources/npad/npad.h +++ b/src/hid_core/resources/npad/npad.h @@ -157,6 +157,8 @@ public: Result SetNpadSystemExtStateEnabled(u64 aruid, bool is_enabled); + Result AssigningSingleOnSlSrPress(u64 aruid, bool is_enabled); + private: struct VibrationData { bool device_mounted{}; |