aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Headless.SDL2/Program.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.Headless.SDL2/Program.cs
parent7c9360d39353db38a8b5c5ff9c52924a577f089e (diff)
misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)
Very basic migration across the codebase.
Diffstat (limited to 'Ryujinx.Headless.SDL2/Program.cs')
-rw-r--r--Ryujinx.Headless.SDL2/Program.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ryujinx.Headless.SDL2/Program.cs b/Ryujinx.Headless.SDL2/Program.cs
index 508daae5..39dbddcd 100644
--- a/Ryujinx.Headless.SDL2/Program.cs
+++ b/Ryujinx.Headless.SDL2/Program.cs
@@ -28,7 +28,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
-using System.Runtime.InteropServices;
using System.Text.Json;
using System.Threading;
@@ -473,7 +472,7 @@ namespace Ryujinx.Headless.SDL2
private static void ExecutionEntrypoint()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
{
_windowsMultimediaTimerResolution = new WindowsMultimediaTimerResolution(1);
}
@@ -490,8 +489,11 @@ namespace Ryujinx.Headless.SDL2
_emulationContext.Dispose();
_window.Dispose();
- _windowsMultimediaTimerResolution?.Dispose();
- _windowsMultimediaTimerResolution = null;
+ if (OperatingSystem.IsWindows())
+ {
+ _windowsMultimediaTimerResolution?.Dispose();
+ _windowsMultimediaTimerResolution = null;
+ }
}
private static bool LoadApplication(Options options)