summaryrefslogtreecommitdiffstats
path: root/src/hid_core
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2024-01-07 04:17:57 +0100
committergerman77 <juangerman-13@hotmail.com>2024-01-07 04:18:44 +0100
commita36f4d0a9f2c0fee837856e4db3e4ca10bfed25b (patch)
treee13147afa84aaba79e36bbee59b0aa86f81ccf38 /src/hid_core
parentMerge pull request #12596 from german77/hid_qlaunch (diff)
downloadyuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar.gz
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar.bz2
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar.lz
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar.xz
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.tar.zst
yuzu-a36f4d0a9f2c0fee837856e4db3e4ca10bfed25b.zip
Diffstat (limited to 'src/hid_core')
-rw-r--r--src/hid_core/resources/npad/npad.cpp17
-rw-r--r--src/hid_core/resources/npad/npad.h6
2 files changed, 23 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index e6c035628..ea035d759 100644
--- a/src/hid_core/resources/npad/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -1339,4 +1339,21 @@ AppletDetailedUiType NPad::GetAppletDetailedUiType(Core::HID::NpadIdType npad_id
};
}
+Result NPad::SetNpadCaptureButtonAssignment(u64 aruid, Core::HID::NpadStyleSet npad_style_set,
+ Core::HID::NpadButton button_assignment) {
+ std::scoped_lock lock{mutex};
+ return npad_resource.SetNpadCaptureButtonAssignment(aruid, npad_style_set, button_assignment);
+}
+
+Result NPad::ClearNpadCaptureButtonAssignment(u64 aruid) {
+ std::scoped_lock lock{mutex};
+ return npad_resource.ClearNpadCaptureButtonAssignment(aruid);
+}
+
+std::size_t NPad::GetNpadCaptureButtonAssignment(std::span<Core::HID::NpadButton> out_list,
+ u64 aruid) const {
+ std::scoped_lock lock{mutex};
+ return npad_resource.GetNpadCaptureButtonAssignment(out_list, aruid);
+}
+
} // namespace Service::HID
diff --git a/src/hid_core/resources/npad/npad.h b/src/hid_core/resources/npad/npad.h
index 58f8c7acf..e602ddaea 100644
--- a/src/hid_core/resources/npad/npad.h
+++ b/src/hid_core/resources/npad/npad.h
@@ -149,6 +149,12 @@ public:
AppletDetailedUiType GetAppletDetailedUiType(Core::HID::NpadIdType npad_id);
+ Result SetNpadCaptureButtonAssignment(u64 aruid, Core::HID::NpadStyleSet npad_style_set,
+ Core::HID::NpadButton button_assignment);
+ Result ClearNpadCaptureButtonAssignment(u64 aruid);
+ std::size_t GetNpadCaptureButtonAssignment(std::span<Core::HID::NpadButton> out_list,
+ u64 aruid) const;
+
private:
struct VibrationData {
bool device_mounted{};