mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-14 16:37:07 +00:00
Android: Fix qualifiers for precise sleep event
This commit is contained in:
parent
b4eaa5f262
commit
0149b71ac9
1 changed files with 6 additions and 2 deletions
|
|
@ -1,9 +1,11 @@
|
|||
using Ryujinx.Common.SystemInterop;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.Common.PreciseSleep
|
||||
{
|
||||
[SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")]
|
||||
public static class PreciseSleepHelper
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -12,7 +14,8 @@ namespace Ryujinx.Common.PreciseSleep
|
|||
/// <returns>A precise sleep event</returns>
|
||||
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();
|
||||
}
|
||||
|
|
@ -52,7 +55,8 @@ namespace Ryujinx.Common.PreciseSleep
|
|||
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.
|
||||
now = PerformanceCounter.ElapsedTicks;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue