mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 08:12:44 +01:00
Merge pull request #11517 from german77/amiibo-format
service: nfc: Fix amiibo formatting
This commit is contained in:
commit
d26c76180d
1 changed files with 8 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue