diff options
| author | Narr the Reg <juangerman-13@hotmail.com> | 2023-06-14 18:16:23 -0600 |
|---|---|---|
| committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-06-14 18:16:23 -0600 |
| commit | 61b45885176e8045f8df19085e1588c8f0da60b0 (patch) | |
| tree | 2848fef0cb6569d93d491cfc403b3c2c487636d1 /src/core/hle/service/nfc/nfc_interface.cpp | |
| parent | b1b13ddc6bdc8d9d67a53a33465f5cf84146a262 (diff) | |
service: nfc: Read tag protocol only for nfc backend
Diffstat (limited to 'src/core/hle/service/nfc/nfc_interface.cpp')
| -rw-r--r-- | src/core/hle/service/nfc/nfc_interface.cpp | 8 |
1 files changed, 6 insertions, 2 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); |
