mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Add a warning if game is trying to use blocking sockets
This commit is contained in:
parent
475b721e7d
commit
cc271ddcea
1 changed files with 14 additions and 0 deletions
|
|
@ -186,6 +186,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasEmittedBlockingWarning = false;
|
||||||
|
|
||||||
public LinuxError Receive(out int receiveSize, Span<byte> buffer, BsdSocketFlags flags)
|
public LinuxError Receive(out int receiveSize, Span<byte> buffer, BsdSocketFlags flags)
|
||||||
{
|
{
|
||||||
LinuxError result;
|
LinuxError result;
|
||||||
|
|
@ -200,6 +202,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
shouldBlockAfterOperation = true;
|
shouldBlockAfterOperation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Blocking && !hasEmittedBlockingWarning)
|
||||||
|
{
|
||||||
|
Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Blocking socket operations are not yet working properly. Expect network errors.");
|
||||||
|
hasEmittedBlockingWarning = true;
|
||||||
|
}
|
||||||
|
|
||||||
receiveSize = Socket.Receive(buffer, ConvertBsdSocketFlags(flags));
|
receiveSize = Socket.Receive(buffer, ConvertBsdSocketFlags(flags));
|
||||||
|
|
||||||
result = LinuxError.SUCCESS;
|
result = LinuxError.SUCCESS;
|
||||||
|
|
@ -237,6 +245,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
shouldBlockAfterOperation = true;
|
shouldBlockAfterOperation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Blocking && !hasEmittedBlockingWarning)
|
||||||
|
{
|
||||||
|
Logger.Warning?.PrintMsg(LogClass.ServiceBsd, "Blocking socket operations are not yet working properly. Expect network errors.");
|
||||||
|
hasEmittedBlockingWarning = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Socket.IsBound)
|
if (!Socket.IsBound)
|
||||||
{
|
{
|
||||||
receiveSize = -1;
|
receiveSize = -1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue