소스 검색

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
Ac_K 4 년 전
부모
커밋
50ba233ac6
1개의 변경된 파일4개의 추가작업 그리고 12개의 파일을 삭제
  1. 4 12
      Ryujinx.HLE/HOS/Ipc/IpcMessage.cs

+ 4 - 12
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);
             }