diff options
| author | 2023-06-04 15:50:44 -0600 | |
|---|---|---|
| committer | 2023-06-06 17:06:21 -0600 | |
| commit | 107aa52cdbf9c6e7dc4a6e95da3ae18bc382778e (patch) | |
| tree | 409c20c05570bfd1ee86abe5e6c0cd2ec1069d17 /src/core/hle/service/nfp | |
| parent | Merge pull request #10651 from Morph1984/a (diff) | |
| download | yuzu-107aa52cdbf9c6e7dc4a6e95da3ae18bc382778e.tar.gz yuzu-107aa52cdbf9c6e7dc4a6e95da3ae18bc382778e.tar.xz yuzu-107aa52cdbf9c6e7dc4a6e95da3ae18bc382778e.zip | |
service: nfc: Add backup support
Diffstat (limited to 'src/core/hle/service/nfp')
| -rw-r--r-- | src/core/hle/service/nfp/nfp_interface.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nfp/nfp_result.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/nfp/nfp_interface.cpp b/src/core/hle/service/nfp/nfp_interface.cpp index 21d159154..34ef9d82d 100644 --- a/src/core/hle/service/nfp/nfp_interface.cpp +++ b/src/core/hle/service/nfp/nfp_interface.cpp | |||
| @@ -126,7 +126,7 @@ void Interface::Flush(HLERequestContext& ctx) { | |||
| 126 | void Interface::Restore(HLERequestContext& ctx) { | 126 | void Interface::Restore(HLERequestContext& ctx) { |
| 127 | IPC::RequestParser rp{ctx}; | 127 | IPC::RequestParser rp{ctx}; |
| 128 | const auto device_handle{rp.Pop<u64>()}; | 128 | const auto device_handle{rp.Pop<u64>()}; |
| 129 | LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle); | 129 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| 130 | 130 | ||
| 131 | auto result = GetManager()->Restore(device_handle); | 131 | auto result = GetManager()->Restore(device_handle); |
| 132 | result = TranslateResultToServiceError(result); | 132 | result = TranslateResultToServiceError(result); |
| @@ -394,7 +394,7 @@ void Interface::BreakTag(HLERequestContext& ctx) { | |||
| 394 | void Interface::ReadBackupData(HLERequestContext& ctx) { | 394 | void Interface::ReadBackupData(HLERequestContext& ctx) { |
| 395 | IPC::RequestParser rp{ctx}; | 395 | IPC::RequestParser rp{ctx}; |
| 396 | const auto device_handle{rp.Pop<u64>()}; | 396 | const auto device_handle{rp.Pop<u64>()}; |
| 397 | LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle); | 397 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| 398 | 398 | ||
| 399 | std::vector<u8> backup_data{}; | 399 | std::vector<u8> backup_data{}; |
| 400 | auto result = GetManager()->ReadBackupData(device_handle, backup_data); | 400 | auto result = GetManager()->ReadBackupData(device_handle, backup_data); |
| @@ -412,7 +412,7 @@ void Interface::WriteBackupData(HLERequestContext& ctx) { | |||
| 412 | IPC::RequestParser rp{ctx}; | 412 | IPC::RequestParser rp{ctx}; |
| 413 | const auto device_handle{rp.Pop<u64>()}; | 413 | const auto device_handle{rp.Pop<u64>()}; |
| 414 | const auto backup_data_buffer{ctx.ReadBuffer()}; | 414 | const auto backup_data_buffer{ctx.ReadBuffer()}; |
| 415 | LOG_WARNING(Service_NFP, "(STUBBED) called, device_handle={}", device_handle); | 415 | LOG_INFO(Service_NFP, "called, device_handle={}", device_handle); |
| 416 | 416 | ||
| 417 | auto result = GetManager()->WriteBackupData(device_handle, backup_data_buffer); | 417 | auto result = GetManager()->WriteBackupData(device_handle, backup_data_buffer); |
| 418 | result = TranslateResultToServiceError(result); | 418 | result = TranslateResultToServiceError(result); |
diff --git a/src/core/hle/service/nfp/nfp_result.h b/src/core/hle/service/nfp/nfp_result.h index 4c126cd81..618533843 100644 --- a/src/core/hle/service/nfp/nfp_result.h +++ b/src/core/hle/service/nfp/nfp_result.h | |||
| @@ -17,9 +17,11 @@ constexpr Result ResultWriteAmiiboFailed(ErrorModule::NFP, 88); | |||
| 17 | constexpr Result ResultTagRemoved(ErrorModule::NFP, 97); | 17 | constexpr Result ResultTagRemoved(ErrorModule::NFP, 97); |
| 18 | constexpr Result ResultRegistrationIsNotInitialized(ErrorModule::NFP, 120); | 18 | constexpr Result ResultRegistrationIsNotInitialized(ErrorModule::NFP, 120); |
| 19 | constexpr Result ResultApplicationAreaIsNotInitialized(ErrorModule::NFP, 128); | 19 | constexpr Result ResultApplicationAreaIsNotInitialized(ErrorModule::NFP, 128); |
| 20 | constexpr Result ResultCorruptedDataWithBackup(ErrorModule::NFP, 136); | ||
| 20 | constexpr Result ResultCorruptedData(ErrorModule::NFP, 144); | 21 | constexpr Result ResultCorruptedData(ErrorModule::NFP, 144); |
| 21 | constexpr Result ResultWrongApplicationAreaId(ErrorModule::NFP, 152); | 22 | constexpr Result ResultWrongApplicationAreaId(ErrorModule::NFP, 152); |
| 22 | constexpr Result ResultApplicationAreaExist(ErrorModule::NFP, 168); | 23 | constexpr Result ResultApplicationAreaExist(ErrorModule::NFP, 168); |
| 23 | constexpr Result ResultNotAnAmiibo(ErrorModule::NFP, 178); | 24 | constexpr Result ResultNotAnAmiibo(ErrorModule::NFP, 178); |
| 25 | constexpr Result ResultUnableToAccessBackupFile(ErrorModule::NFP, 200); | ||
| 24 | 26 | ||
| 25 | } // namespace Service::NFP | 27 | } // namespace Service::NFP |