Add On-Screen controller and Fix Internet and Lan Multiplayer

This commit is contained in:
Stossy11 2024-11-29 00:01:33 +11:00
parent b2424a9652
commit 9a86b2000a
14 changed files with 494 additions and 215 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
using System.Net;
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
{
@ -15,16 +16,23 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
public DnsSetting(IPInterfaceProperties interfaceProperties)
{
IsDynamicDnsEnabled = OperatingSystem.IsWindows() && interfaceProperties.IsDynamicDnsEnabled;
IPAddress ip = IPAddress.Parse("1.1.1.1");
if (interfaceProperties.DnsAddresses.Count == 0)
{
PrimaryDns = new IpV4Address();
SecondaryDns = new IpV4Address();
}
else
{
PrimaryDns = new IpV4Address(interfaceProperties.DnsAddresses[0]);
SecondaryDns = new IpV4Address(interfaceProperties.DnsAddresses[interfaceProperties.DnsAddresses.Count > 1 ? 1 : 0]);
if (OperatingSystem.IsIOS()) {
PrimaryDns = new IpV4Address(ip);
SecondaryDns = new IpV4Address(ip);
} else {
if (interfaceProperties.DnsAddresses.Count == 0)
{
PrimaryDns = new IpV4Address();
SecondaryDns = new IpV4Address();
}
else
{
PrimaryDns = new IpV4Address(interfaceProperties.DnsAddresses[0]);
SecondaryDns = new IpV4Address(interfaceProperties.DnsAddresses[interfaceProperties.DnsAddresses.Count > 1 ? 1 : 0]);
}
}
}
}