diff options
author | Merry <git@mary.rs> | 2022-04-07 20:31:32 +0200 |
---|---|---|
committer | Merry <git@mary.rs> | 2022-04-07 20:44:07 +0200 |
commit | 1f275eb0777d5274cea85585c7eb2f8afc63f925 (patch) | |
tree | 9d54a4bf0e4585e25195791e88631054b00fbd02 /src/core/hle/service | |
parent | common: Replace lock_guard with scoped_lock (diff) | |
download | yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar.gz yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar.bz2 yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar.lz yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar.xz yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.tar.zst yuzu-1f275eb0777d5274cea85585c7eb2f8afc63f925.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/nvflinger/hos_binder_driver_server.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index aa6cb34b7..4e17a952e 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -318,7 +318,7 @@ void Controller_NPad::OnRelease() { } void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) { - std::lock_guard lock{mutex}; + std::scoped_lock lock{mutex}; auto& controller = GetControllerFromNpadIdType(npad_id); const auto controller_type = controller.device->GetNpadStyleIndex(); if (!controller.device->IsConnected()) { diff --git a/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp b/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp index 0c937d682..094ba2542 100644 --- a/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp +++ b/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp @@ -14,7 +14,7 @@ HosBinderDriverServer::HosBinderDriverServer(Core::System& system_) HosBinderDriverServer::~HosBinderDriverServer() {} u64 HosBinderDriverServer::RegisterProducer(std::unique_ptr<android::IBinder>&& binder) { - std::lock_guard lk{lock}; + std::scoped_lock lk{lock}; last_id++; @@ -24,7 +24,7 @@ u64 HosBinderDriverServer::RegisterProducer(std::unique_ptr<android::IBinder>&& } android::IBinder* HosBinderDriverServer::TryGetProducer(u64 id) { - std::lock_guard lk{lock}; + std::scoped_lock lk{lock}; if (auto search = producers.find(id); search != producers.end()) { return search->second.get(); |