diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-11 00:16:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 00:16:50 +0100 |
commit | 108737fcc6244c34b4a6bdb542a6fd7a4006b86e (patch) | |
tree | 5dc61c0d1fcf1e12cdec4b5dc1e5145080555505 /src/core/hle/service/hle_ipc.cpp | |
parent | Merge pull request #12296 from liamwhite/client-session (diff) | |
parent | ro: add separate ro service (diff) | |
download | yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar.gz yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar.bz2 yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar.lz yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar.xz yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.tar.zst yuzu-108737fcc6244c34b4a6bdb542a6fd7a4006b86e.zip |
Diffstat (limited to 'src/core/hle/service/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/service/hle_ipc.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hle/service/hle_ipc.cpp b/src/core/hle/service/hle_ipc.cpp index ff374ae39..38955932c 100644 --- a/src/core/hle/service/hle_ipc.cpp +++ b/src/core/hle/service/hle_ipc.cpp @@ -146,8 +146,10 @@ HLERequestContext::HLERequestContext(Kernel::KernelCore& kernel_, Core::Memory:: HLERequestContext::~HLERequestContext() = default; -void HLERequestContext::ParseCommandBuffer(const Kernel::KHandleTable& handle_table, - u32_le* src_cmdbuf, bool incoming) { +void HLERequestContext::ParseCommandBuffer(Kernel::KProcess& process, u32_le* src_cmdbuf, + bool incoming) { + client_handle_table = &process.GetHandleTable(); + IPC::RequestParser rp(src_cmdbuf); command_header = rp.PopRaw<IPC::CommandHeader>(); @@ -160,7 +162,8 @@ void HLERequestContext::ParseCommandBuffer(const Kernel::KHandleTable& handle_ta if (command_header->enable_handle_descriptor) { handle_descriptor_header = rp.PopRaw<IPC::HandleDescriptorHeader>(); if (handle_descriptor_header->send_current_pid) { - pid = rp.Pop<u64>(); + pid = process.GetProcessId(); + rp.Skip(2, false); } if (incoming) { // Populate the object lists with the data in the IPC request. @@ -267,9 +270,9 @@ void HLERequestContext::ParseCommandBuffer(const Kernel::KHandleTable& handle_ta rp.Skip(1, false); // The command is actually an u64, but we don't use the high part. } -Result HLERequestContext::PopulateFromIncomingCommandBuffer( - const Kernel::KHandleTable& handle_table, u32_le* src_cmdbuf) { - ParseCommandBuffer(handle_table, src_cmdbuf, true); +Result HLERequestContext::PopulateFromIncomingCommandBuffer(Kernel::KProcess& process, + u32_le* src_cmdbuf) { + ParseCommandBuffer(process, src_cmdbuf, true); if (command_header->IsCloseCommand()) { // Close does not populate the rest of the IPC header |