mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
service: nfc: Don't tag amiibos as corrupted if they are loaded as read only
This commit is contained in:
parent
9dc9aaf4af
commit
e40a2d2fd2
1 changed files with 5 additions and 5 deletions
|
@ -438,16 +438,16 @@ Result NfcDevice::Mount(NFP::ModelType model_type, NFP::MountTarget mount_target
|
|||
is_corrupted = true;
|
||||
}
|
||||
|
||||
if (!is_corrupted) {
|
||||
device_state = DeviceState::TagMounted;
|
||||
mount_target = mount_target_;
|
||||
|
||||
if (!is_corrupted && mount_target != NFP::MountTarget::Rom) {
|
||||
std::vector<u8> data(sizeof(NFP::EncryptedNTAG215File));
|
||||
memcpy(data.data(), &encrypted_tag_data, sizeof(encrypted_tag_data));
|
||||
WriteBackupData(encrypted_tag_data.uuid, data);
|
||||
}
|
||||
|
||||
device_state = DeviceState::TagMounted;
|
||||
mount_target = mount_target_;
|
||||
|
||||
if (is_corrupted) {
|
||||
if (is_corrupted && mount_target != NFP::MountTarget::Rom) {
|
||||
bool has_backup = HasBackup(encrypted_tag_data.uuid).IsSuccess();
|
||||
return has_backup ? ResultCorruptedDataWithBackup : ResultCorruptedData;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue