From 3e0aaeba98e3278b26f1d6be5dd013a953ff784f Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Fri, 21 Oct 2022 22:20:27 -0500 Subject: service: nfp: Allow amiibos without keys --- src/core/hle/service/nfp/nfp_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/hle/service/nfp/nfp_device.cpp') diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp index 4e6b8e558..b19672560 100644 --- a/src/core/hle/service/nfp/nfp_device.cpp +++ b/src/core/hle/service/nfp/nfp_device.cpp @@ -234,6 +234,14 @@ Result NfpDevice::Mount(MountTarget mount_target_) { return NotAnAmiibo; } + // Mark amiibos as read only when keys are missing + if (!AmiiboCrypto::IsKeyAvailable()) { + LOG_ERROR(Service_NFP, "No keys detected"); + device_state = DeviceState::TagMounted; + mount_target = MountTarget::Rom; + return ResultSuccess; + } + if (!AmiiboCrypto::DecodeAmiibo(encrypted_tag_data, tag_data)) { LOG_ERROR(Service_NFP, "Can't decode amiibo {}", device_state); return CorruptedData; -- cgit v1.2.3