2 changed files with 14 additions and 12 deletions
@ -1,20 +1,18 @@ |
|||
using System; |
|||
using System.Threading; |
|||
using Avalonia.Compatibility; |
|||
using Avalonia.Metadata; |
|||
using Avalonia.Platform.Internal; |
|||
|
|||
namespace Avalonia.Platform |
|||
{ |
|||
[PrivateApi] |
|||
public class StandardRuntimePlatform : IRuntimePlatform |
|||
{ |
|||
private static readonly RuntimePlatformInfo s_info = new() |
|||
public virtual RuntimePlatformInfo GetRuntimeInfo() => new() |
|||
{ |
|||
IsDesktop = OperatingSystemEx.IsWindows() || OperatingSystemEx.IsMacOS() || OperatingSystemEx.IsLinux(), |
|||
IsMobile = OperatingSystemEx.IsAndroid() || OperatingSystemEx.IsIOS() |
|||
IsDesktop = OperatingSystemEx.IsWindows() |
|||
|| OperatingSystemEx.IsMacOS() || OperatingSystemEx.IsMacCatalyst() |
|||
|| OperatingSystemEx.IsLinux() || OperatingSystemEx.IsFreeBSD(), |
|||
IsMobile = OperatingSystemEx.IsAndroid() || (OperatingSystemEx.IsIOS() && !OperatingSystemEx.IsMacCatalyst()), |
|||
IsTV = OperatingSystemEx.IsTvOS() |
|||
}; |
|||
|
|||
public virtual RuntimePlatformInfo GetRuntimeInfo() => s_info; |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue