diff options
author | Ac_K <Acoustik666@gmail.com> | 2021-06-22 19:32:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 19:32:22 +0200 |
commit | 50ba233ac628ffb9661ea2bda2cda216d18e81c1 (patch) | |
tree | f242e1eb6ee32ded1e8d472c79225f6b98416bcb | |
parent | 992ab77f1f89cf4b31f66fb51ed9572705fbe3df (diff) |
ipc: Remove size checks for buffer type 0x21/0x22 (#2387)
* ipc: Remove size checks for buffer type 0x21/0x22
Since original IPC implementation doesn't check the buffers size, there is no reason to check them so I've removed it. Checking the buffers addresses could prevent to unexpected behaviors.
That's fix a bsd service issue with some homebrew and some games like Knockout City (https://github.com/Ryujinx/Ryujinx-Games-List/issues/3622) which is now bootable:
* addresses gdkchan's review
-rw-r--r-- | Ryujinx.HLE/HOS/Ipc/IpcMessage.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Ryujinx.HLE/HOS/Ipc/IpcMessage.cs b/Ryujinx.HLE/HOS/Ipc/IpcMessage.cs index e5b9bf04..09e237fe 100644 --- a/Ryujinx.HLE/HOS/Ipc/IpcMessage.cs +++ b/Ryujinx.HLE/HOS/Ipc/IpcMessage.cs @@ -246,16 +246,12 @@ namespace Ryujinx.HLE.HOS.Ipc // ReSharper disable once InconsistentNaming public (ulong Position, ulong Size) GetBufferType0x21(int index = 0) { - if (PtrBuff.Count > index && - PtrBuff[index].Position != 0 && - PtrBuff[index].Size != 0) + if (PtrBuff.Count > index && PtrBuff[index].Position != 0) { return (PtrBuff[index].Position, PtrBuff[index].Size); } - if (SendBuff.Count > index && - SendBuff[index].Position != 0 && - SendBuff[index].Size != 0) + if (SendBuff.Count > index) { return (SendBuff[index].Position, SendBuff[index].Size); } @@ -266,16 +262,12 @@ namespace Ryujinx.HLE.HOS.Ipc // ReSharper disable once InconsistentNaming public (ulong Position, ulong Size) GetBufferType0x22(int index = 0) { - if (RecvListBuff.Count > index && - RecvListBuff[index].Position != 0 && - RecvListBuff[index].Size != 0) + if (RecvListBuff.Count > index && RecvListBuff[index].Position != 0) { return (RecvListBuff[index].Position, RecvListBuff[index].Size); } - if (ReceiveBuff.Count > index && - ReceiveBuff[index].Position != 0 && - ReceiveBuff[index].Size != 0) + if (ReceiveBuff.Count > index) { return (ReceiveBuff[index].Position, ReceiveBuff[index].Size); } |