diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-08 11:20:15 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-11 00:05:10 +0200 |
commit | 7a06037c5fd2e4ee968ca89869000a0758d38da3 (patch) | |
tree | de6f94038b8254724fda2d1badd81ab7b884227d /src/core/hle | |
parent | hle: kernel: Further cleanup and add TIPC helpers. (diff) | |
download | yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.gz yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.bz2 yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.lz yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.xz yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.tar.zst yuzu-7a06037c5fd2e4ee968ca89869000a0758d38da3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/ipc.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h index 55b1716e4..602e12606 100644 --- a/src/core/hle/ipc.h +++ b/src/core/hle/ipc.h @@ -32,7 +32,8 @@ enum class CommandType : u32 { Control = 5, RequestWithContext = 6, ControlWithContext = 7, - Unspecified, + TIPC_Close = 15, + TIPC_CommandRegion = 16, // Start of TIPC commands, this is an offset. }; struct CommandHeader { @@ -57,6 +58,20 @@ struct CommandHeader { BitField<10, 4, BufferDescriptorCFlag> buf_c_descriptor_flags; BitField<31, 1, u32> enable_handle_descriptor; }; + + bool IsTipc() const { + return type.Value() >= CommandType::TIPC_CommandRegion; + } + + bool IsCloseCommand() const { + switch (type.Value()) { + case CommandType::Close: + case CommandType::TIPC_Close: + return true; + default: + return false; + } + } }; static_assert(sizeof(CommandHeader) == 8, "CommandHeader size is incorrect"); |