mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-15 19:37:05 +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 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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue