diff options
| author | Ac_K <Acoustik666@gmail.com> | 2021-07-06 20:41:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-06 20:41:11 +0200 |
| commit | 242e51c7f5da7f1bb044400332383c89ff379121 (patch) | |
| tree | b7eab7dbbdcd2250c8413fecdd33d5306e3d5a8a | |
| parent | b72f7de4057b3dee8581e58295f2db5fc563d50c (diff) | |
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.
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs index d6381fba..9092f6e0 100644 --- a/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs +++ b/Ryujinx.HLE/HOS/Services/Nifm/StaticService/Types/DnsSetting.cs @@ -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) { |
