summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-12-01 21:21:55 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2023-12-01 21:21:55 +0100
commite40a2d2fd26df45878be8ca02dcd6a30054fbbaa (patch)
tree4982cbf9c8ded78186aa99f27c929c8fbdfdefab /src/core/hle
parentMerge pull request #12223 from liamwhite/fruit-company (diff)
downloadyuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar.gz
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar.bz2
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar.lz
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar.xz
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.tar.zst
yuzu-e40a2d2fd26df45878be8ca02dcd6a30054fbbaa.zip
Diffstat (limited to 'src/core/hle')
-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;
}