Skip to content
Snippets Groups Projects
Unverified Commit d26c7618 authored by liamwhite's avatar liamwhite Committed by GitHub
Browse files

Merge pull request #11517 from german77/amiibo-format

service: nfc: Fix amiibo formatting
parents 62d47330 0d4aa912
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment