diff options
| author | Narr the Reg <juangerman-13@hotmail.com> | 2022-10-21 22:20:27 -0500 |
|---|---|---|
| committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-10-21 23:08:07 -0500 |
| commit | 3e0aaeba98e3278b26f1d6be5dd013a953ff784f (patch) | |
| tree | 35012cf4f8105c8821a76f4ee032bce260a50abb /src/core/hle/service/nfp/nfp_device.cpp | |
| parent | 82fdfb33ac7cc6da4f24c5a8bd88855287e93fcc (diff) | |
service: nfp: Allow amiibos without keys
Diffstat (limited to 'src/core/hle/service/nfp/nfp_device.cpp')
| -rw-r--r-- | src/core/hle/service/nfp/nfp_device.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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; |
