mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-18 08:16:39 +00:00
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
This commit is contained in:
parent
992ab77f1f
commit
50ba233ac6
1 changed files with 4 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue