From f2dd80f0b32f369ddd260eb3cfedc645be0ae992 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 23 Sep 2018 21:29:58 +1000 Subject: [PATCH] Few fixups for nfc --- src/core/core.cpp | 4 ++-- src/core/core.h | 4 ++-- src/core/hle/service/nfp/nfp.cpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/core.cpp b/src/core/core.cpp index 5205890b45..b3801229db 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -476,11 +476,11 @@ void System::LoadAmiibo(const std::string& filename) { impl->nfc_activate->Signal(); } -Kernel::SharedPtr& System::GetNFCEvent() const { +const Kernel::SharedPtr& System::GetNFCEvent() const { return impl->nfc_activate; } -std::string& System::GetNFCFilename() const { +const std::string& System::GetNFCFilename() const { return impl->nfc_filename; } diff --git a/src/core/core.h b/src/core/core.h index 40f6b6e85a..04500e6ee6 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -225,11 +225,11 @@ public: std::shared_ptr GetFilesystem() const; - std::string& GetNFCFilename() const; + const std::string& GetNFCFilename() const; void LoadAmiibo(const std::string& path); - Kernel::SharedPtr& GetNFCEvent() const; + const Kernel::SharedPtr& GetNFCEvent() const; private: System(); diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 1bc4de3f2f..e64cf86a59 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -157,7 +157,8 @@ private: case DeviceState::TagFound: case DeviceState::TagNearby: deactivate_event->Signal(); - [[fallthrough]]; + device_state = DeviceState::Initialized; + break; case DeviceState::SearchingForTag: case DeviceState::TagRemoved: device_state = DeviceState::Initialized;