summaryrefslogtreecommitdiff
path: root/src/core/hle/service/nfc
diff options
context:
space:
mode:
authorGravatar german772023-09-15 21:41:05 -0600
committerGravatar german772023-09-15 22:02:57 -0600
commit0d4aa9125e3cf457b970fd33b05b5255d44a59d3 (patch)
treefc05f88198207b8fbcd117b4187887077127ad11 /src/core/hle/service/nfc
parentMerge pull request #11385 from liamwhite/acceptcancel (diff)
downloadyuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.gz
yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.xz
yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.zip
service: nfc: Fix amiibo formatting
Diffstat (limited to 'src/core/hle/service/nfc')
-rw-r--r--src/core/hle/service/nfc/common/device.cpp14
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() {
874} 874}
875 875
876Result NfcDevice::Format() { 876Result NfcDevice::Format() {
877 auto result1 = DeleteApplicationArea(); 877 Result result = ResultSuccess;
878 auto result2 = DeleteRegisterInfo();
879 878
880 if (result1.IsError()) { 879 if (device_state == DeviceState::TagFound) {
881 return result1; 880 result = Mount(NFP::ModelType::Amiibo, NFP::MountTarget::All);
882 } 881 }
883 882
884 if (result2.IsError()) { 883 if (result.IsError()) {
885 return result2; 884 return result;
886 } 885 }
887 886
887 DeleteApplicationArea();
888 DeleteRegisterInfo();
889
888 return Flush(); 890 return Flush();
889} 891}
890 892