summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-06-15 02:16:23 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2023-06-15 02:16:23 +0200
commit61b45885176e8045f8df19085e1588c8f0da60b0 (patch)
tree2848fef0cb6569d93d491cfc403b3c2c487636d1 /src
parentservice: nfc: Accuracy fixes (diff)
downloadyuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar.gz
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar.bz2
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar.lz
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar.xz
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.tar.zst
yuzu-61b45885176e8045f8df19085e1588c8f0da60b0.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nfc/nfc_interface.cpp8
-rw-r--r--src/core/hle/service/nfc/nfc_types.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/service/nfc/nfc_interface.cpp b/src/core/hle/service/nfc/nfc_interface.cpp
index 48405f6f2..130fb7f78 100644
--- a/src/core/hle/service/nfc/nfc_interface.cpp
+++ b/src/core/hle/service/nfc/nfc_interface.cpp
@@ -142,9 +142,13 @@ void NfcInterface::AttachAvailabilityChangeEvent(HLERequestContext& ctx) {
void NfcInterface::StartDetection(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto device_handle{rp.Pop<u64>()};
- const auto tag_protocol{rp.PopEnum<NfcProtocol>()};
- LOG_INFO(Service_NFC, "called, device_handle={}, nfp_protocol={}", device_handle, tag_protocol);
+ auto tag_protocol{NfcProtocol::All};
+
+ if (backend_type == BackendType::Nfc) {
+ tag_protocol = rp.PopEnum<NfcProtocol>();
+ }
+ LOG_INFO(Service_NFC, "called, device_handle={}, nfp_protocol={}", device_handle, tag_protocol);
auto result = GetManager()->StartDetection(device_handle, tag_protocol);
result = TranslateResultToServiceError(result);
diff --git a/src/core/hle/service/nfc/nfc_types.h b/src/core/hle/service/nfc/nfc_types.h
index 1a0866e78..68e724442 100644
--- a/src/core/hle/service/nfc/nfc_types.h
+++ b/src/core/hle/service/nfc/nfc_types.h
@@ -59,14 +59,11 @@ enum class PackedTagType : u8 {
};
// This is nn::nfc::NfcProtocol
-// Verify this enum. It might be completely wrong default protocol is 0x48
enum class NfcProtocol : u32 {
None,
TypeA = 1U << 0, // ISO14443A
TypeB = 1U << 1, // ISO14443B
TypeF = 1U << 2, // Sony FeliCa
- Unknown1 = 1U << 3,
- Unknown2 = 1U << 5,
All = 0xFFFFFFFFU,
};