diff options
| author | 2023-09-15 21:41:05 -0600 | |
|---|---|---|
| committer | 2023-09-15 22:02:57 -0600 | |
| commit | 0d4aa9125e3cf457b970fd33b05b5255d44a59d3 (patch) | |
| tree | fc05f88198207b8fbcd117b4187887077127ad11 | |
| parent | Merge pull request #11385 from liamwhite/acceptcancel (diff) | |
| download | yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.gz yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.tar.xz yuzu-0d4aa9125e3cf457b970fd33b05b5255d44a59d3.zip | |
service: nfc: Fix amiibo formatting
| -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() { | |||
| 874 | } | 874 | } |
| 875 | 875 | ||
| 876 | Result NfcDevice::Format() { | 876 | Result 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 | ||