diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-15 20:59:56 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2024-01-15 21:07:54 +0100 |
commit | c661b95864690741f21f42976806ab1825af5e12 (patch) | |
tree | 7b96920f433e40d95f103531188c3f11c78b81fc /src/core/hle | |
parent | Merge pull request #12681 from t895/stick-toggles (diff) | |
download | yuzu-c661b95864690741f21f42976806ab1825af5e12.tar yuzu-c661b95864690741f21f42976806ab1825af5e12.tar.gz yuzu-c661b95864690741f21f42976806ab1825af5e12.tar.bz2 yuzu-c661b95864690741f21f42976806ab1825af5e12.tar.lz yuzu-c661b95864690741f21f42976806ab1825af5e12.tar.xz yuzu-c661b95864690741f21f42976806ab1825af5e12.tar.zst yuzu-c661b95864690741f21f42976806ab1825af5e12.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfc/common/device.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 31cc87acc..cc7776efc 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -441,7 +441,10 @@ Result NfcDevice::Mount(NFP::ModelType model_type, NFP::MountTarget mount_target device_state = DeviceState::TagMounted; mount_target = mount_target_; - if (!is_corrupted && mount_target != NFP::MountTarget::Rom) { + const bool create_backup = + mount_target == NFP::MountTarget::All || mount_target == NFP::MountTarget::Ram || + (mount_target == NFP::MountTarget::Rom && HasBackup(encrypted_tag_data.uuid).IsError()); + if (!is_corrupted && create_backup) { std::vector<u8> data(sizeof(NFP::EncryptedNTAG215File)); memcpy(data.data(), &encrypted_tag_data, sizeof(encrypted_tag_data)); WriteBackupData(encrypted_tag_data.uuid, data); |