diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-04 15:50:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-04 15:50:33 -0500 |
| commit | 0e93cad4f09919bdcb01b78234972bbff7718e5d (patch) | |
| tree | aba09a6d8801b28dbfb6c7f5f35b4a666db6d931 /src/core/hle/service/hid/controllers/gesture.cpp | |
| parent | 148ad0cf0b08a0c41db6450f38ccb6ecf95b938a (diff) | |
| parent | 55623222908d2fd979de9ab101b1deff33a622f8 (diff) | |
Merge pull request #12549 from german77/npadresource
service: hid: Implement NpadResource and NpadData
Diffstat (limited to 'src/core/hle/service/hid/controllers/gesture.cpp')
| -rw-r--r-- | src/core/hle/service/hid/controllers/gesture.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 6e686fe65..c73da13ee 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp @@ -28,10 +28,11 @@ Gesture::Gesture(Core::HID::HIDCore& hid_core_) : ControllerBase(hid_core_) { Gesture::~Gesture() = default; void Gesture::OnInit() { + 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; } @@ -44,10 +45,11 @@ void Gesture::OnInit() { void Gesture::OnRelease() {} void Gesture::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; } |
