diff options
author | german77 <juangerman-13@hotmail.com> | 2024-01-07 04:35:10 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-07 06:30:41 +0100 |
commit | f224ef6185679338aa8eb8093b150c461f488982 (patch) | |
tree | 153d010b4d9a46f4a57e7cfec09f8fd419c17af8 /src/hid_core/resources/npad | |
parent | service: hid: Implement CaptureButtonAssignment (diff) | |
download | yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar.gz yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar.bz2 yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar.lz yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar.xz yuzu-f224ef6185679338aa8eb8093b150c461f488982.tar.zst yuzu-f224ef6185679338aa8eb8093b150c461f488982.zip |
Diffstat (limited to 'src/hid_core/resources/npad')
-rw-r--r-- | src/hid_core/resources/npad/npad.cpp | 12 | ||||
-rw-r--r-- | src/hid_core/resources/npad/npad.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index ea035d759..6be6edb7e 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp @@ -1356,4 +1356,16 @@ std::size_t NPad::GetNpadCaptureButtonAssignment(std::span<Core::HID::NpadButton return npad_resource.GetNpadCaptureButtonAssignment(out_list, aruid); } +Result NPad::SetNpadSystemExtStateEnabled(u64 aruid, bool is_enabled) { + std::scoped_lock lock{mutex}; + const auto result = npad_resource.SetNpadSystemExtStateEnabled(aruid, is_enabled); + + if (result.IsSuccess()) { + std::scoped_lock shared_lock{*applet_resource_holder.shared_mutex}; + // TODO: abstracted_pad->EnableAppletToGetInput(aruid); + } + + return result; +} + } // namespace Service::HID diff --git a/src/hid_core/resources/npad/npad.h b/src/hid_core/resources/npad/npad.h index e602ddaea..73e2780c4 100644 --- a/src/hid_core/resources/npad/npad.h +++ b/src/hid_core/resources/npad/npad.h @@ -155,6 +155,8 @@ public: std::size_t GetNpadCaptureButtonAssignment(std::span<Core::HID::NpadButton> out_list, u64 aruid) const; + Result SetNpadSystemExtStateEnabled(u64 aruid, bool is_enabled); + private: struct VibrationData { bool device_mounted{}; |