소스 검색

Handle the case where byte optionValues are sent to BSD (#3405)

Some games and the Mario Odyssey Multiplayer mod do this.

The SMO multiplayer mod also needs you to revert #3394 as it uses a blocking socket to receive (otherwise it hangs), and it doesn't seem to like being forced as non-blocking.
riperiperi 3 년 전
부모
커밋
b7fb474bfe
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs

+ 1 - 1
Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs

@@ -304,7 +304,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
                     return LinuxError.EOPNOTSUPP;
                 }
 
-                int value = MemoryMarshal.Read<int>(optionValue);
+                int value = optionValue.Length >= 4 ? MemoryMarshal.Read<int>(optionValue) : MemoryMarshal.Read<byte>(optionValue);
 
                 if (option == BsdSocketOption.SoLinger)
                 {