summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/six_axis.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-02 04:33:07 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2024-01-04 03:21:16 +0100
commit55623222908d2fd979de9ab101b1deff33a622f8 (patch)
treeaba09a6d8801b28dbfb6c7f5f35b4a666db6d931 /src/core/hle/service/hid/controllers/six_axis.cpp
parentservice: hid: Implement NpadResource and NpadData (diff)
downloadyuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar.gz
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar.bz2
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar.lz
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar.xz
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.tar.zst
yuzu-55623222908d2fd979de9ab101b1deff33a622f8.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/six_axis.cpp')
-rw-r--r--src/core/hle/service/hid/controllers/six_axis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/six_axis.cpp b/src/core/hle/service/hid/controllers/six_axis.cpp
index a5a67dea6..adab60911 100644
--- a/src/core/hle/service/hid/controllers/six_axis.cpp
+++ b/src/core/hle/service/hid/controllers/six_axis.cpp
@@ -27,10 +27,11 @@ void SixAxis::OnInit() {}
void SixAxis::OnRelease() {}
void SixAxis::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
+ std::scoped_lock shared_lock{*shared_mutex};
const u64 aruid = applet_resource->GetActiveAruid();
auto* data = applet_resource->GetAruidData(aruid);
- if (data == nullptr) {
+ if (data == nullptr || !data->flag.is_assigned) {
return;
}