Browse Source

service: nfc: Fix amiibo formatting

pull/15/merge
german77 2 years ago
parent
commit
0d4aa9125e
  1. 14
      src/core/hle/service/nfc/common/device.cpp

14
src/core/hle/service/nfc/common/device.cpp

@ -874,17 +874,19 @@ Result NfcDevice::RestoreAmiibo() {
} }
Result NfcDevice::Format() { 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(); return Flush();
} }

Loading…
Cancel
Save