hle/ipc_helpers: Allow pushing signed values
This is kind of a large hole in the API, given we allow popping signed values. This fixes that.
This commit is contained in:
parent
8dbb8edcd3
commit
ac603cf130
|
@ -216,6 +216,11 @@ private:
|
||||||
|
|
||||||
/// Push ///
|
/// Push ///
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline void ResponseBuilder::Push(s32 value) {
|
||||||
|
cmdbuf[index++] = static_cast<u32>(value);
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline void ResponseBuilder::Push(u32 value) {
|
inline void ResponseBuilder::Push(u32 value) {
|
||||||
cmdbuf[index++] = value;
|
cmdbuf[index++] = value;
|
||||||
|
@ -234,11 +239,28 @@ inline void ResponseBuilder::Push(ResultCode value) {
|
||||||
Push<u32>(0);
|
Push<u32>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline void ResponseBuilder::Push(s8 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline void ResponseBuilder::Push(s16 value) {
|
||||||
|
PushRaw(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
inline void ResponseBuilder::Push(s64 value) {
|
||||||
|
Push(static_cast<u32>(value));
|
||||||
|
Push(static_cast<u32>(value >> 32));
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline void ResponseBuilder::Push(u8 value) {
|
inline void ResponseBuilder::Push(u8 value) {
|
||||||
PushRaw(value);
|
PushRaw(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline void ResponseBuilder::Push(u16 value) {
|
inline void ResponseBuilder::Push(u16 value) {
|
||||||
PushRaw(value);
|
PushRaw(value);
|
||||||
|
|
Loading…
Reference in a new issue