mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-29 21:43:01 +00:00
nifm: Fixes IsDynamicDnsEnabled not supported (#2443)
For a strange reason `IPInterfaceProperties.IsDynamicDnsEnabled` returns a `PlatformNotSupported` exception in Linux. This PR fixes this issue with a `try/catch` and set the value to false. Closes #2415.
This commit is contained in:
parent
b72f7de405
commit
242e51c7f5
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Net.NetworkInformation;
|
using System;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
||||||
|
@ -12,8 +13,15 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
|
||||||
public IpV4Address SecondaryDns;
|
public IpV4Address SecondaryDns;
|
||||||
|
|
||||||
public DnsSetting(IPInterfaceProperties interfaceProperties)
|
public DnsSetting(IPInterfaceProperties interfaceProperties)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
IsDynamicDnsEnabled = interfaceProperties.IsDynamicDnsEnabled;
|
IsDynamicDnsEnabled = interfaceProperties.IsDynamicDnsEnabled;
|
||||||
|
}
|
||||||
|
catch (PlatformNotSupportedException)
|
||||||
|
{
|
||||||
|
IsDynamicDnsEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (interfaceProperties.DnsAddresses.Count == 0)
|
if (interfaceProperties.DnsAddresses.Count == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue