summaryrefslogtreecommitdiffstats
path: root/src/hid_core/resources/npad/npad.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-21 20:51:50 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2024-01-21 21:05:18 +0100
commit1b984738ab7cd2031237e9d97f04ce1ff1ad88bb (patch)
tree68f78d461810f018a102e400f0be6be0ba40d403 /src/hid_core/resources/npad/npad.cpp
parentMerge pull request #12720 from t895/return-to-global (diff)
downloadyuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar.gz
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar.bz2
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar.lz
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar.xz
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.tar.zst
yuzu-1b984738ab7cd2031237e9d97f04ce1ff1ad88bb.zip
Diffstat (limited to 'src/hid_core/resources/npad/npad.cpp')
-rw-r--r--src/hid_core/resources/npad/npad.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index 212f01429..d13a489c9 100644
--- a/src/hid_core/resources/npad/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -480,6 +480,10 @@ void NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
continue;
}
+ if (!data->flag.enable_pad_input) {
+ continue;
+ }
+
RequestPadStateUpdate(aruid, controller.device->GetNpadIdType());
auto& pad_state = controller.npad_pad_state;
auto& libnx_state = controller.npad_libnx_state;
@@ -1316,4 +1320,13 @@ void NPad::UpdateHandheldAbstractState() {
abstracted_pads[NpadIdTypeToIndex(Core::HID::NpadIdType::Handheld)].Update();
}
+void NPad::EnableAppletToGetInput(u64 aruid) {
+ std::scoped_lock lock{mutex};
+ std::scoped_lock shared_lock{*applet_resource_holder.shared_mutex};
+
+ for (auto& abstract_pad : abstracted_pads) {
+ abstract_pad.EnableAppletToGetInput(aruid);
+ }
+}
+
} // namespace Service::HID