0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-22 23:45:46 +00:00

Do not sign-extend timestamps

This commit is contained in:
gdkchan 2018-03-10 20:51:55 -03:00
parent 3777fb44cf
commit 28275a8976
3 changed files with 6 additions and 6 deletions

View file

@ -38,10 +38,10 @@ namespace ChocolArm64.State
public uint CtrEl0 => 0x8444c004; public uint CtrEl0 => 0x8444c004;
public uint DczidEl0 => 0x00000004; public uint DczidEl0 => 0x00000004;
private const long TicksPerS = 19_200_000; private const ulong TicksPerS = 19_200_000;
private const long TicksPerMS = TicksPerS / 1_000; private const ulong TicksPerMS = TicksPerS / 1_000;
public long CntpctEl0 => Environment.TickCount * TicksPerMS; public ulong CntpctEl0 => (ulong)Environment.TickCount * TicksPerMS;
public event EventHandler<AInstExceptionEventArgs> Break; public event EventHandler<AInstExceptionEventArgs> Break;
public event EventHandler<AInstExceptionEventArgs> SvcCall; public event EventHandler<AInstExceptionEventArgs> SvcCall;

View file

@ -258,9 +258,9 @@ namespace Ryujinx.Core.Input
} }
} }
private long GetTimestamp() private static long GetTimestamp()
{ {
return Environment.TickCount * 19_200; return (long)((ulong)Environment.TickCount * 19_200);
} }
} }
} }

View file

@ -67,7 +67,7 @@ namespace Ryujinx.Core.OsHle.Svc
private void SvcGetSystemTick(AThreadState ThreadState) private void SvcGetSystemTick(AThreadState ThreadState)
{ {
ThreadState.X0 = (ulong)ThreadState.CntpctEl0; ThreadState.X0 = ThreadState.CntpctEl0;
} }
private void SvcConnectToNamedPort(AThreadState ThreadState) private void SvcConnectToNamedPort(AThreadState ThreadState)