summaryrefslogtreecommitdiffstats
path: root/src/hid_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/hid_core')
-rw-r--r--src/hid_core/resources/npad/npad.cpp12
-rw-r--r--src/hid_core/resources/npad/npad.h2
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{};