mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +00:00
core: De-globalize HLE lock (#7212)
This commit is contained in:
parent
83b329f6e1
commit
6ec079ede8
18 changed files with 66 additions and 92 deletions
|
@ -5,8 +5,6 @@
|
|||
#include "common/archives.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/event.h"
|
||||
#include "core/hle/lock.h"
|
||||
#include "core/hle/service/nfc/nfc.h"
|
||||
#include "core/hle/service/nfc/nfc_m.h"
|
||||
#include "core/hle/service/nfc/nfc_u.h"
|
||||
|
@ -680,26 +678,21 @@ std::shared_ptr<Module> Module::Interface::GetModule() const {
|
|||
}
|
||||
|
||||
bool Module::Interface::IsSearchingForAmiibos() {
|
||||
std::lock_guard lock(HLE::g_hle_lock);
|
||||
|
||||
const auto state = nfc->device->GetCurrentState();
|
||||
return state == DeviceState::SearchingForTag;
|
||||
}
|
||||
|
||||
bool Module::Interface::IsTagActive() {
|
||||
std::lock_guard lock(HLE::g_hle_lock);
|
||||
|
||||
const auto state = nfc->device->GetCurrentState();
|
||||
return state == DeviceState::TagFound || state == DeviceState::TagMounted ||
|
||||
state == DeviceState::TagPartiallyMounted;
|
||||
}
|
||||
|
||||
bool Module::Interface::LoadAmiibo(const std::string& fullpath) {
|
||||
std::lock_guard lock(HLE::g_hle_lock);
|
||||
return nfc->device->LoadAmiibo(fullpath);
|
||||
}
|
||||
|
||||
void Module::Interface::RemoveAmiibo() {
|
||||
std::lock_guard lock(HLE::g_hle_lock);
|
||||
nfc->device->UnloadAmiibo();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <boost/serialization/binary_object.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/service/nfc/nfc_device.h"
|
||||
#include "core/hle/service/nfc/nfc_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue