summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-02 00:39:38 +0100
committerGitHub <noreply@github.com>2023-12-02 00:39:38 +0100
commite9a43bae6f80e3c650f379a00372547648247536 (patch)
tree4f3656ec2d766f4fca81143704031a6dfc987c7a /src
parentMerge pull request #12243 from zhaobot/tx-update-20231201021513 (diff)
parentservice: nfc: Don't tag amiibos as corrupted if they are loaded as read only (diff)
downloadyuzu-e9a43bae6f80e3c650f379a00372547648247536.tar
yuzu-e9a43bae6f80e3c650f379a00372547648247536.tar.gz
yuzu-e9a43bae6f80e3c650f379a00372547648247536.tar.bz2
yuzu-e9a43bae6f80e3c650f379a00372547648247536.tar.lz
yuzu-e9a43bae6f80e3c650f379a00372547648247536.tar.xz
yuzu-e9a43bae6f80e3c650f379a00372547648247536.tar.zst
yuzu-e9a43bae6f80e3c650f379a00372547648247536.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nfc/common/device.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp
index 47516f883..f97e5b44c 100644
--- a/src/core/hle/service/nfc/common/device.cpp
+++ b/src/core/hle/service/nfc/common/device.cpp
@@ -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;
}