1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-04 19:22: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:
Ac_K 2021-07-06 20:41:11 +02:00 committed by GitHub
parent b72f7de405
commit 242e51c7f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
using System.Net.NetworkInformation;
using System;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
@ -13,7 +14,14 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService.Types
public DnsSetting(IPInterfaceProperties interfaceProperties)
{
IsDynamicDnsEnabled = interfaceProperties.IsDynamicDnsEnabled;
try
{
IsDynamicDnsEnabled = interfaceProperties.IsDynamicDnsEnabled;
}
catch (PlatformNotSupportedException)
{
IsDynamicDnsEnabled = false;
}
if (interfaceProperties.DnsAddresses.Count == 0)
{