aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Memory/MemoryManagementWindows.cs
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-12-05 00:02:30 +0100
committerGitHub <noreply@github.com>2021-12-04 20:02:30 -0300
commitf39fce8f54c1e4dfa1ca56e4a2b1668e9ea30956 (patch)
treeeaf667ed72bc8838d5404712d60b67579502f0d5 /Ryujinx.Memory/MemoryManagementWindows.cs
parent7c9360d39353db38a8b5c5ff9c52924a577f089e (diff)
misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)
Very basic migration across the codebase.
Diffstat (limited to 'Ryujinx.Memory/MemoryManagementWindows.cs')
-rw-r--r--Ryujinx.Memory/MemoryManagementWindows.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Ryujinx.Memory/MemoryManagementWindows.cs b/Ryujinx.Memory/MemoryManagementWindows.cs
index b14fb6c1..48616ec3 100644
--- a/Ryujinx.Memory/MemoryManagementWindows.cs
+++ b/Ryujinx.Memory/MemoryManagementWindows.cs
@@ -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)