From 33ae6e544bd477da629e3f4ab4925f457ecfbbb7 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 19 Apr 2018 04:06:23 -0300 Subject: [HLE/Kernel] Fix SetThreadPriority, allow nano seconds values > int.MaxValue, fix on WaitProcessWideKeyAtomic (althrough looks like it still doesn't work properly --- Ryujinx.Core/OsHle/Kernel/SvcSystem.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Ryujinx.Core/OsHle/Kernel/SvcSystem.cs') diff --git a/Ryujinx.Core/OsHle/Kernel/SvcSystem.cs b/Ryujinx.Core/OsHle/Kernel/SvcSystem.cs index ebbbef4a..48e8ce38 100644 --- a/Ryujinx.Core/OsHle/Kernel/SvcSystem.cs +++ b/Ryujinx.Core/OsHle/Kernel/SvcSystem.cs @@ -83,9 +83,9 @@ namespace Ryujinx.Core.OsHle.Kernel private void SvcWaitSynchronization(AThreadState ThreadState) { - long HandlesPtr = (long)ThreadState.X1; - int HandlesCount = (int)ThreadState.X2; - long Timeout = (long)ThreadState.X3; + long HandlesPtr = (long)ThreadState.X1; + int HandlesCount = (int)ThreadState.X2; + ulong Timeout = ThreadState.X3; KThread CurrThread = Process.GetThread(ThreadState.Tpidr); @@ -115,9 +115,9 @@ namespace Ryujinx.Core.OsHle.Kernel ulong Result = 0; - if (Timeout != -1) + if (Timeout != ulong.MaxValue) { - HandleIndex = WaitHandle.WaitAny(Handles, (int)(Timeout / 1000000)); + HandleIndex = WaitHandle.WaitAny(Handles, NsTimeConverter.GetTimeMs(Timeout)); if (HandleIndex == WaitHandle.WaitTimeout) { -- cgit v1.2.3