mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-27 03:42:51 -06:00
service: nfc: Fix amiibo formatting
This commit is contained in:
parent
8fb9f78e83
commit
0d4aa9125e
1 changed files with 8 additions and 6 deletions
|
@ -874,17 +874,19 @@ Result NfcDevice::RestoreAmiibo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Result NfcDevice::Format() {
|
Result NfcDevice::Format() {
|
||||||
auto result1 = DeleteApplicationArea();
|
Result result = ResultSuccess;
|
||||||
auto result2 = DeleteRegisterInfo();
|
|
||||||
|
|
||||||
if (result1.IsError()) {
|
if (device_state == DeviceState::TagFound) {
|
||||||
return result1;
|
result = Mount(NFP::ModelType::Amiibo, NFP::MountTarget::All);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result2.IsError()) {
|
if (result.IsError()) {
|
||||||
return result2;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DeleteApplicationArea();
|
||||||
|
DeleteRegisterInfo();
|
||||||
|
|
||||||
return Flush();
|
return Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue