diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-04 21:50:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 21:50:33 +0100 |
commit | 0e93cad4f09919bdcb01b78234972bbff7718e5d (patch) | |
tree | aba09a6d8801b28dbfb6c7f5f35b4a666db6d931 /src/core/hle/service/hid/controllers/digitizer.cpp | |
parent | Merge pull request #12554 from german77/directconnect (diff) | |
parent | service: hid: Remove data races when handling shared memory (diff) | |
download | yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar.gz yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar.bz2 yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar.lz yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar.xz yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.tar.zst yuzu-0e93cad4f09919bdcb01b78234972bbff7718e5d.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/digitizer.cpp')
-rw-r--r-- | src/core/hle/service/hid/controllers/digitizer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/digitizer.cpp b/src/core/hle/service/hid/controllers/digitizer.cpp index c01580fd6..d5514c965 100644 --- a/src/core/hle/service/hid/controllers/digitizer.cpp +++ b/src/core/hle/service/hid/controllers/digitizer.cpp @@ -21,10 +21,11 @@ void Digitizer::OnUpdate(const Core::Timing::CoreTiming& core_timing) { return; } + 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; } |