Whoops
This commit is contained in:
parent
981616b362
commit
41cce9b9d0
1 changed files with 2 additions and 8 deletions
|
@ -15,9 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
|
|
||||||
private static readonly DateTime StartupDate = DateTime.UtcNow;
|
private static readonly DateTime StartupDate = DateTime.UtcNow;
|
||||||
|
|
||||||
private KSharedMemory _timeSharedMem;
|
public IStaticService()
|
||||||
|
|
||||||
public IStaticService(KSharedMemory timeSharedMem)
|
|
||||||
{
|
{
|
||||||
_commands = new Dictionary<int, ServiceProcessRequest>
|
_commands = new Dictionary<int, ServiceProcessRequest>
|
||||||
{
|
{
|
||||||
|
@ -29,8 +27,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
{ 20, GetSharedMemoryNativeHandle },
|
{ 20, GetSharedMemoryNativeHandle },
|
||||||
{ 300, CalculateMonotonicSystemClockBaseTimePoint }
|
{ 300, CalculateMonotonicSystemClockBaseTimePoint }
|
||||||
};
|
};
|
||||||
|
|
||||||
_timeSharedMem = timeSharedMem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetStandardUserSystemClock(ServiceCtx context)
|
public long GetStandardUserSystemClock(ServiceCtx context)
|
||||||
|
@ -70,9 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
|
|
||||||
public long GetSharedMemoryNativeHandle(ServiceCtx context)
|
public long GetSharedMemoryNativeHandle(ServiceCtx context)
|
||||||
{
|
{
|
||||||
KHandleTable handleTable = context.Process.HandleTable;
|
if (context.Process.HandleTable.GenerateHandle(context.Device.System.TimeSharedMem, out int handle) != KernelResult.Success)
|
||||||
|
|
||||||
if (handleTable.GenerateHandle(_timeSharedMem, out int handle) != KernelResult.Success)
|
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException("Out of handles!");
|
throw new InvalidOperationException("Out of handles!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue