aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/System
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Common/System')
-rw-r--r--Ryujinx.Common/System/DisplaySleep.cs4
-rw-r--r--Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs2
2 files changed, 4 insertions, 2 deletions
diff --git a/Ryujinx.Common/System/DisplaySleep.cs b/Ryujinx.Common/System/DisplaySleep.cs
index 77f9dd75..bad964b9 100644
--- a/Ryujinx.Common/System/DisplaySleep.cs
+++ b/Ryujinx.Common/System/DisplaySleep.cs
@@ -18,7 +18,7 @@ namespace Ryujinx.Common.System
static public void Prevent()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
{
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED);
}
@@ -26,7 +26,7 @@ namespace Ryujinx.Common.System
static public void Restore()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
{
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);
}
diff --git a/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs b/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
index 69ce145b..d19fbe73 100644
--- a/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
+++ b/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
@@ -2,12 +2,14 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
namespace Ryujinx.Common.System
{
/// <summary>
/// Handle Windows Multimedia timer resolution.
/// </summary>
+ [SupportedOSPlatform("windows")]
public class WindowsMultimediaTimerResolution : IDisposable
{
[StructLayout(LayoutKind.Sequential)]