diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-07-21 15:21:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 15:21:48 +0200 |
commit | c0202da9ac8301f86086ea898e6789dae981b13f (patch) | |
tree | 0d9ecb6a93fcde52d5a56aa80ce686bb3e1ab9ad /src/core/hle/service/nfc/nfc_interface.cpp | |
parent | Merge pull request #11116 from lat9nq/clang-shadowing (diff) | |
parent | service: nfc: Update Implementation to match with latest RE (diff) | |
download | yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar.gz yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar.bz2 yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar.lz yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar.xz yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.tar.zst yuzu-c0202da9ac8301f86086ea898e6789dae981b13f.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) { |