summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-16 17:40:26 +0200
committerGitHub <noreply@github.com>2023-09-16 17:40:26 +0200
commitd26c76180d4c5b5324aa4fb53c86c1bf1a2d1436 (patch)
tree4618c007fb20869c940b9e2d0333f72ef9e7fc6e /src/core
parentMerge pull request #11500 from liamwhite/debug-stuff (diff)
parentservice: nfc: Fix amiibo formatting (diff)
downloadyuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.gz
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.bz2
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.lz
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.xz
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.tar.zst
yuzu-d26c76180d4c5b5324aa4fb53c86c1bf1a2d1436.zip
Diffstat (limited to 'src/core')
-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() {
}
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();
}