misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)
Very basic migration across the codebase.
This commit is contained in:
parent
7c9360d393
commit
f39fce8f54
17 changed files with 77 additions and 68 deletions
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -909,8 +908,12 @@ namespace Ryujinx.Ui
|
|||
|
||||
RendererWidget.Dispose();
|
||||
|
||||
_windowsMultimediaTimerResolution?.Dispose();
|
||||
_windowsMultimediaTimerResolution = null;
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
_windowsMultimediaTimerResolution?.Dispose();
|
||||
_windowsMultimediaTimerResolution = null;
|
||||
}
|
||||
|
||||
DisplaySleep.Restore();
|
||||
|
||||
_viewBox.Remove(RendererWidget);
|
||||
|
@ -941,7 +944,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
private void CreateGameWindow()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
_windowsMultimediaTimerResolution = new WindowsMultimediaTimerResolution(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue