[HLE/Kernel] Fix SetThreadPriority, allow nano seconds values > int.MaxValue, fix on WaitProcessWideKeyAtomic (althrough looks like it still doesn't work properly

This commit is contained in:
gdkchan 2018-04-19 04:06:23 -03:00
parent 62b2124c03
commit 33ae6e544b
6 changed files with 47 additions and 24 deletions

View file

@ -0,0 +1,19 @@
namespace Ryujinx.Core.OsHle.Kernel
{
static class NsTimeConverter
{
public static int GetTimeMs(ulong Ns)
{
ulong Ms = Ns / 1_000_000;
if (Ms < int.MaxValue)
{
return (int)Ms;
}
else
{
return int.MaxValue;
}
}
}
}