summaryrefslogtreecommitdiff
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
authorGravatar Lectem2016-12-28 17:11:14 +0100
committerGravatar Lectem2017-03-18 10:44:01 +0100
commit501e23ce59a84cb0b0ef3db5b1c84939fa732811 (patch)
tree00f79bb33e874da62310fc334e35434b2a446366 /src/core/hle/ipc_helpers.h
parentMerge pull request #2497 from wwylele/input-2 (diff)
downloadyuzu-501e23ce59a84cb0b0ef3db5b1c84939fa732811.tar.gz
yuzu-501e23ce59a84cb0b0ef3db5b1c84939fa732811.tar.xz
yuzu-501e23ce59a84cb0b0ef3db5b1c84939fa732811.zip
refactor APT service to use the new IPC helpers
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r--src/core/hle/ipc_helpers.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 323158bb5..11a33c8bd 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -27,6 +27,18 @@ public:
27 DEBUG_ASSERT_MSG(index == TotalSize(), "Operations do not match the header (cmd 0x%x)", 27 DEBUG_ASSERT_MSG(index == TotalSize(), "Operations do not match the header (cmd 0x%x)",
28 header.raw); 28 header.raw);
29 } 29 }
30
31 /**
32 * @brief Retrieves the address of a static buffer, used when a buffer is needed for output
33 * @param buffer_id The index of the static buffer
34 * @param data_size If non-null, will store the size of the buffer
35 */
36 VAddr PeekStaticBuffer(u8 buffer_id, size_t* data_size = nullptr) const {
37 u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / 4 + buffer_id * 2;
38 if (data_size)
39 *data_size = StaticBufferDescInfo{static_buffer[0]}.size;
40 return static_buffer[1];
41 }
30}; 42};
31 43
32class RequestBuilder : public RequestHelperBase { 44class RequestBuilder : public RequestHelperBase {