mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +02:00
Android: Fix qualifiers for precise sleep event
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
using Ryujinx.Common.SystemInterop;
|
using Ryujinx.Common.SystemInterop;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx.Common.PreciseSleep
|
namespace Ryujinx.Common.PreciseSleep
|
||||||
{
|
{
|
||||||
|
[SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")]
|
||||||
public static class PreciseSleepHelper
|
public static class PreciseSleepHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -12,7 +14,8 @@ namespace Ryujinx.Common.PreciseSleep
|
|||||||
/// <returns>A precise sleep event</returns>
|
/// <returns>A precise sleep event</returns>
|
||||||
public static IPreciseSleepEvent CreateEvent()
|
public static IPreciseSleepEvent CreateEvent()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsAndroid())
|
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() ||
|
||||||
|
OperatingSystem.IsAndroid() || PlatformInfo.IsBionic)
|
||||||
{
|
{
|
||||||
return new NanosleepEvent();
|
return new NanosleepEvent();
|
||||||
}
|
}
|
||||||
@@ -52,7 +55,8 @@ namespace Ryujinx.Common.PreciseSleep
|
|||||||
evt.WaitOne((int)ms);
|
evt.WaitOne((int)ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsAndroid())
|
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() ||
|
||||||
|
OperatingSystem.IsAndroid() || PlatformInfo.IsBionic)
|
||||||
{
|
{
|
||||||
// Do a nanosleep.
|
// Do a nanosleep.
|
||||||
now = PerformanceCounter.ElapsedTicks;
|
now = PerformanceCounter.ElapsedTicks;
|
||||||
|
|||||||
Reference in New Issue
Block a user