summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nfp/nfp_device.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-10-22 05:20:27 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-10-22 06:08:07 +0200
commit3e0aaeba98e3278b26f1d6be5dd013a953ff784f (patch)
tree35012cf4f8105c8821a76f4ee032bce260a50abb /src/core/hle/service/nfp/nfp_device.cpp
parentservice: nfp: remove unnecessary include (diff)
downloadyuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar.gz
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar.bz2
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar.lz
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar.xz
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.tar.zst
yuzu-3e0aaeba98e3278b26f1d6be5dd013a953ff784f.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nfp/nfp_device.cpp8
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;