misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)

Very basic migration across the codebase.
This commit is contained in:
Mary 2021-12-05 00:02:30 +01:00 committed by GitHub
parent 7c9360d393
commit f39fce8f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 77 additions and 68 deletions

View file

@ -2,9 +2,11 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
namespace Ryujinx.Memory
{
[SupportedOSPlatform("windows")]
static class MemoryManagementWindows
{
private static readonly IntPtr InvalidHandleValue = new IntPtr(-1);
@ -59,9 +61,7 @@ namespace Ryujinx.Memory
static MemoryManagementWindows()
{
Version version = Environment.OSVersion.Version;
UseWin10Placeholders = (version.Major == 10 && version.Build >= 17134) || version.Major > 10;
UseWin10Placeholders = OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17134);
}
public static IntPtr Allocate(IntPtr size)