mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
d0136dd7c2
Instead of constructing IPCCommandResult with static member functions in the Device class, we can just add the relevant constructors to the reply struct itself. Makes more sense than putting it in Device when the struct is used in the kernel code and doesn't use any Device specific members... This commit also changes the IPC command handlers to return an optional IPCCommandResult rather than an IPCCommandResult. This removes the need for a separate boolean that indicates whether the "result" is actually a reply, and also avoids the need to set dummy result values and ticks. It also makes it really obvious which commands can result in no reply being generated. Finally, this commit renames IPCCommandResult to IPCReply since the struct is now only used for actual replies. This new name is less verbose in my opinion. The diff is quite large since this touches every command handler, but the only functional change is that I fixed EnqueueIPCReply to take a s64 for cycles_in_future to match IPCReply.