summaryrefslogtreecommitdiffstats
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
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:
header.raw);
}
+ void Skip(unsigned size_in_words, bool set_to_null) {
+ if (set_to_null)
+ memset(cmdbuf + index, 0, size_in_words * sizeof(u32));
+ index += size_in_words;
+ }
+
/**
* @brief Retrieves the address of a static buffer, used when a buffer is needed for output
* @param buffer_id The index of the static buffer
* @param data_size If non-null, will store the size of the buffer
*/
VAddr PeekStaticBuffer(u8 buffer_id, size_t* data_size = nullptr) const {
- u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / 4 + buffer_id * 2;
+ u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / sizeof(u32) + buffer_id * 2;
if (data_size)
*data_size = StaticBufferDescInfo{static_buffer[0]}.size;
return static_buffer[1];