diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-07-15 05:26:45 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-07-17 19:24:23 +0200 |
commit | 54f150b70a88397258219558896397aa4ed0b9c5 (patch) | |
tree | ff5162db490d8438d5e218845cd9e6296724f842 /src/core/hle/service/nfc/nfc_interface.cpp | |
parent | file_sys/content_archive: Detect compressed NCAs (#11047) (diff) | |
download | yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar.gz yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar.bz2 yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar.lz yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar.xz yuzu-54f150b70a88397258219558896397aa4ed0b9c5.tar.zst yuzu-54f150b70a88397258219558896397aa4ed0b9c5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfc/nfc_interface.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/service/nfc/nfc_interface.cpp b/src/core/hle/service/nfc/nfc_interface.cpp index e7ca7582e..179c7ba2c 100644 --- a/src/core/hle/service/nfc/nfc_interface.cpp +++ b/src/core/hle/service/nfc/nfc_interface.cpp @@ -79,7 +79,7 @@ void NfcInterface::ListDevices(HLERequestContext& ctx) { const std::size_t max_allowed_devices = ctx.GetWriteBufferNumElements<u64>(); LOG_DEBUG(Service_NFC, "called"); - auto result = GetManager()->ListDevices(nfp_devices, max_allowed_devices); + auto result = GetManager()->ListDevices(nfp_devices, max_allowed_devices, true); result = TranslateResultToServiceError(result); if (result.IsError()) { @@ -190,9 +190,13 @@ void NfcInterface::AttachActivateEvent(HLERequestContext& ctx) { const auto device_handle{rp.Pop<u64>()}; LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); + Kernel::KReadableEvent* out_event = nullptr; + auto result = GetManager()->AttachActivateEvent(&out_event, device_handle); + result = TranslateResultToServiceError(result); + IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(ResultSuccess); - rb.PushCopyObjects(GetManager()->AttachActivateEvent(device_handle)); + rb.Push(result); + rb.PushCopyObjects(out_event); } void NfcInterface::AttachDeactivateEvent(HLERequestContext& ctx) { @@ -200,9 +204,13 @@ void NfcInterface::AttachDeactivateEvent(HLERequestContext& ctx) { const auto device_handle{rp.Pop<u64>()}; LOG_DEBUG(Service_NFC, "called, device_handle={}", device_handle); + Kernel::KReadableEvent* out_event = nullptr; + auto result = GetManager()->AttachDeactivateEvent(&out_event, device_handle); + result = TranslateResultToServiceError(result); + IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(ResultSuccess); - rb.PushCopyObjects(GetManager()->AttachDeactivateEvent(device_handle)); + rb.Push(result); + rb.PushCopyObjects(out_event); } void NfcInterface::ReadMifare(HLERequestContext& ctx) { |