summaryrefslogtreecommitdiff
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
authorGravatar Lectem2017-03-18 11:47:40 +0100
committerGravatar Lectem2017-03-18 11:47:40 +0100
commit12ed7464771e4c6b1992ef4438be9038fb59b2fc (patch)
tree9b9aa325793afff90ba731d48662e69a7ef402be /src/core/hle/ipc_helpers.h
parentfix #2560 and other comments (diff)
downloadyuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.gz
yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.xz
yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.zip
IPCHelper Skip method + address comments for apt
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r--src/core/hle/ipc_helpers.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 98c95a7f3..06c4c5a85 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -28,13 +28,19 @@ public:
28 header.raw); 28 header.raw);
29 } 29 }
30 30
31 void Skip(unsigned size_in_words, bool set_to_null) {
32 if (set_to_null)
33 memset(cmdbuf + index, 0, size_in_words * sizeof(u32));
34 index += size_in_words;
35 }
36
31 /** 37 /**
32 * @brief Retrieves the address of a static buffer, used when a buffer is needed for output 38 * @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 39 * @param buffer_id The index of the static buffer
34 * @param data_size If non-null, will store the size of the buffer 40 * @param data_size If non-null, will store the size of the buffer
35 */ 41 */
36 VAddr PeekStaticBuffer(u8 buffer_id, size_t* data_size = nullptr) const { 42 VAddr PeekStaticBuffer(u8 buffer_id, size_t* data_size = nullptr) const {
37 u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / 4 + buffer_id * 2; 43 u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / sizeof(u32) + buffer_id * 2;
38 if (data_size) 44 if (data_size)
39 *data_size = StaticBufferDescInfo{static_buffer[0]}.size; 45 *data_size = StaticBufferDescInfo{static_buffer[0]}.size;
40 return static_buffer[1]; 46 return static_buffer[1];