diff options
author | Lectem <lectem@gmail.com> | 2017-03-18 11:47:40 +0100 |
---|---|---|
committer | Lectem <lectem@gmail.com> | 2017-03-18 11:47:40 +0100 |
commit | 12ed7464771e4c6b1992ef4438be9038fb59b2fc (patch) | |
tree | 9b9aa325793afff90ba731d48662e69a7ef402be /src/core/hle/ipc_helpers.h | |
parent | fix #2560 and other comments (diff) | |
download | yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.gz yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.bz2 yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.lz yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.xz yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.tar.zst yuzu-12ed7464771e4c6b1992ef4438be9038fb59b2fc.zip |
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r-- | src/core/hle/ipc_helpers.h | 8 |
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]; |