diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-04-19 04:06:23 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-04-19 04:06:23 -0300 |
| commit | 33ae6e544bd477da629e3f4ab4925f457ecfbbb7 (patch) | |
| tree | cc303d3cbef41392aff1b4572eb534270644978c /Ryujinx.Core/OsHle/Kernel/SvcSystem.cs | |
| parent | 62b2124c03694bdac5ffae7df8edfe2079bf1a9a (diff) | |
[HLE/Kernel] Fix SetThreadPriority, allow nano seconds values > int.MaxValue, fix on WaitProcessWideKeyAtomic (althrough looks like it still doesn't work properly
Diffstat (limited to 'Ryujinx.Core/OsHle/Kernel/SvcSystem.cs')
| -rw-r--r-- | Ryujinx.Core/OsHle/Kernel/SvcSystem.cs | 10 |
1 files changed, 5 insertions, 5 deletions
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) { |
