summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2023-09-16 11:40:26 -0400
committerGravatar GitHub2023-09-16 11:40:26 -0400
commitd26c76180d4c5b5324aa4fb53c86c1bf1a2d1436 (patch)
tree4618c007fb20869c940b9e2d0333f72ef9e7fc6e /src
parentMerge pull request #11500 from liamwhite/debug-stuff (diff)
parentservice: nfc: Fix amiibo formatting (diff)
downloadyuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.gz
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.xz
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.zip
Merge pull request #11517 from german77/amiibo-format
service: nfc: Fix amiibo formatting
Diffstat (limited to '')
-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