mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-23 15:07:11 +02:00
iOS - Platform Checks
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
This commit is contained in:
parent
5d919039d9
commit
66e58aa6a7
21 changed files with 67 additions and 38 deletions
|
@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
|||
|
||||
public IpAddressSetting(IPInterfaceProperties interfaceProperties, UnicastIPAddressInformation unicastIPAddressInformation)
|
||||
{
|
||||
IsDhcpEnabled = OperatingSystem.IsMacOS() || interfaceProperties.DhcpServerAddresses.Count != 0;
|
||||
IsDhcpEnabled = (OperatingSystem.IsMacOS() || OperatingSystem.IsIOS()) || interfaceProperties.DhcpServerAddresses.Count != 0;
|
||||
Address = new IpV4Address(unicastIPAddressInformation.Address);
|
||||
IPv4Mask = new IpV4Address(unicastIPAddressInformation.IPv4Mask);
|
||||
GatewayAddress = (interfaceProperties.GatewayAddresses.Count == 0) ? new IpV4Address() : new IpV4Address(interfaceProperties.GatewayAddresses[0].Address);
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
|||
{ 0, 0 },
|
||||
};
|
||||
|
||||
private static readonly Dictionary<int, LinuxError> _errorMapMacOs = new()
|
||||
private static readonly Dictionary<int, LinuxError> _errorMapDarwin = new()
|
||||
{
|
||||
{ 35, LinuxError.EAGAIN },
|
||||
{ 11, LinuxError.EDEADLOCK },
|
||||
|
@ -283,9 +283,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
|||
|
||||
public static LinuxError ConvertError(WsaError errorCode)
|
||||
{
|
||||
if (OperatingSystem.IsMacOS())
|
||||
if (OperatingSystem.IsMacOS() || OperatingSystem.IsIOS())
|
||||
{
|
||||
if (_errorMapMacOs.TryGetValue((int)errorCode, out LinuxError errno))
|
||||
if (_errorMapDarwin.TryGetValue((int)errorCode, out LinuxError errno))
|
||||
{
|
||||
return errno;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue