diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-16 05:41:05 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-16 06:02:57 +0200 |
commit | 0d4aa9125e3cf457b970fd33b05b5255d44a59d3 (patch) | |
tree | fc05f88198207b8fbcd117b4187887077127ad11 | |
parent | Merge pull request #11385 from liamwhite/acceptcancel (diff) | |
download | yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.gz yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.bz2 yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.lz yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.xz yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.zst yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.zip |
-rw-r--r-- | src/core/hle/service/nfc/common/device.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 5dda12343..674d2e4b2 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -874,17 +874,19 @@ Result NfcDevice::RestoreAmiibo() { } Result NfcDevice::Format() { - auto result1 = DeleteApplicationArea(); - auto result2 = DeleteRegisterInfo(); + Result result = ResultSuccess; - if (result1.IsError()) { - return result1; + if (device_state == DeviceState::TagFound) { + result = Mount(NFP::ModelType::Amiibo, NFP::MountTarget::All); } - if (result2.IsError()) { - return result2; + if (result.IsError()) { + return result; } + DeleteApplicationArea(); + DeleteRegisterInfo(); + return Flush(); } |