diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/nfp/nfp_device.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp index c5d8ceeff..61a7ea7ac 100644 --- a/src/core/hle/service/nfp/nfp_device.cpp +++ b/src/core/hle/service/nfp/nfp_device.cpp | |||
| @@ -685,6 +685,11 @@ Result NfpDevice::RecreateApplicationArea(u32 access_id, std::span<const u8> dat | |||
| 685 | return WrongDeviceState; | 685 | return WrongDeviceState; |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | if (is_app_area_open) { | ||
| 689 | LOG_ERROR(Service_NFP, "Application area is open"); | ||
| 690 | return WrongDeviceState; | ||
| 691 | } | ||
| 692 | |||
| 688 | if (mount_target == MountTarget::None || mount_target == MountTarget::Rom) { | 693 | if (mount_target == MountTarget::None || mount_target == MountTarget::Rom) { |
| 689 | LOG_ERROR(Service_NFP, "Amiibo is read only", device_state); | 694 | LOG_ERROR(Service_NFP, "Amiibo is read only", device_state); |
| 690 | return WrongDeviceState; | 695 | return WrongDeviceState; |
| @@ -715,6 +720,7 @@ Result NfpDevice::RecreateApplicationArea(u32 access_id, std::span<const u8> dat | |||
| 715 | tag_data.settings.settings.appdata_initialized.Assign(1); | 720 | tag_data.settings.settings.appdata_initialized.Assign(1); |
| 716 | tag_data.application_area_id = access_id; | 721 | tag_data.application_area_id = access_id; |
| 717 | tag_data.unknown = {}; | 722 | tag_data.unknown = {}; |
| 723 | tag_data.unknown2 = {}; | ||
| 718 | 724 | ||
| 719 | UpdateRegisterInfoCrc(); | 725 | UpdateRegisterInfoCrc(); |
| 720 | 726 | ||
| @@ -750,6 +756,10 @@ Result NfpDevice::DeleteApplicationArea() { | |||
| 750 | rng.GenerateRandomBytes(&tag_data.application_id_byte, sizeof(u8)); | 756 | rng.GenerateRandomBytes(&tag_data.application_id_byte, sizeof(u8)); |
| 751 | tag_data.settings.settings.appdata_initialized.Assign(0); | 757 | tag_data.settings.settings.appdata_initialized.Assign(0); |
| 752 | tag_data.unknown = {}; | 758 | tag_data.unknown = {}; |
| 759 | tag_data.unknown2 = {}; | ||
| 760 | is_app_area_open = false; | ||
| 761 | |||
| 762 | UpdateRegisterInfoCrc(); | ||
| 753 | 763 | ||
| 754 | return Flush(); | 764 | return Flush(); |
| 755 | } | 765 | } |