From 80f6df5414517e575037661ffb903232bf3e590c Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 7 Jan 2018 09:56:57 -0500 Subject: IPC: Fixed pushing ResultCodes into the command buffer. They should have 32 bits of padding after the error code now. --- src/core/hle/ipc_helpers.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/core/hle/ipc_helpers.h') diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h index e5b296d60..b58e33a69 100644 --- a/src/core/hle/ipc_helpers.h +++ b/src/core/hle/ipc_helpers.h @@ -142,6 +142,13 @@ void RequestBuilder::PushRaw(const T& value) { index += (sizeof(T) + 3) / 4; // round up to word length } +template <> +inline void RequestBuilder::Push(ResultCode value) { + // Result codes are actually 64-bit in the IPC buffer, but only the high part is discarded. + Push(value.raw); + Push(0); +} + template <> inline void RequestBuilder::Push(u8 value) { PushRaw(value); @@ -163,11 +170,6 @@ inline void RequestBuilder::Push(bool value) { Push(static_cast(value)); } -template <> -inline void RequestBuilder::Push(ResultCode value) { - Push(value.raw); -} - template void RequestBuilder::Push(const First& first_value, const Other&... other_values) { Push(first_value); -- cgit v1.2.3