Address comments
This commit is contained in:
parent
246da18e26
commit
3ae1763efa
9 changed files with 15 additions and 17 deletions
|
@ -12,6 +12,7 @@
|
||||||
protected override ResultCode Update()
|
protected override ResultCode Update()
|
||||||
{
|
{
|
||||||
_sharedMemory.UpdateLocalSystemClockContext(_context);
|
_sharedMemory.UpdateLocalSystemClockContext(_context);
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
protected override ResultCode Update()
|
protected override ResultCode Update()
|
||||||
{
|
{
|
||||||
_sharedMemory.UpdateNetworkSystemClockContext(_context);
|
_sharedMemory.UpdateNetworkSystemClockContext(_context);
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,9 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
{
|
{
|
||||||
if (!NxSettings.Settings.TryGetValue("time!standard_user_clock_initial_year", out object standardUserSystemClockInitialYear))
|
if (!NxSettings.Settings.TryGetValue("time!standard_user_clock_initial_year", out object standardUserSystemClockInitialYear))
|
||||||
{
|
{
|
||||||
// Fallback if not found in settings (nintendo actually abort here)
|
throw new System.InvalidOperationException("standard_user_clock_initial_year isn't defined in system settings!");
|
||||||
standardUserSystemClockInitialYear = 2019;
|
|
||||||
//throw new System.InvalidOperationException("standard_user_clock_initial_year isn't defined in system settings!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context.ResponseData.Write((int)standardUserSystemClockInitialYear);
|
context.ResponseData.Write((int)standardUserSystemClockInitialYear);
|
||||||
|
|
|
@ -102,6 +102,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
public ResultCode SetupStandardUserSystemClock(ServiceCtx context)
|
public ResultCode SetupStandardUserSystemClock(ServiceCtx context)
|
||||||
{
|
{
|
||||||
bool isAutomaticCorrectionEnabled = context.RequestData.ReadBoolean();
|
bool isAutomaticCorrectionEnabled = context.RequestData.ReadBoolean();
|
||||||
|
|
||||||
context.RequestData.BaseStream.Position += 7;
|
context.RequestData.BaseStream.Position += 7;
|
||||||
|
|
||||||
SteadyClockTimePoint steadyClockTimePoint = context.RequestData.ReadStruct<SteadyClockTimePoint>();
|
SteadyClockTimePoint steadyClockTimePoint = context.RequestData.ReadStruct<SteadyClockTimePoint>();
|
||||||
|
@ -196,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
public ResultCode GetAlarmRegistrationEvent(ServiceCtx context)
|
public ResultCode GetAlarmRegistrationEvent(ServiceCtx context)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return ResultCode.NotImplemented;
|
throw new ServiceNotImplementedException(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command(201)]
|
[Command(201)]
|
||||||
|
@ -204,7 +205,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
public ResultCode UpdateSteadyAlarms(ServiceCtx context)
|
public ResultCode UpdateSteadyAlarms(ServiceCtx context)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return ResultCode.NotImplemented;
|
throw new ServiceNotImplementedException(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command(202)]
|
[Command(202)]
|
||||||
|
@ -212,7 +213,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
public ResultCode TryGetNextSteadyClockAlarmSnapshot(ServiceCtx context)
|
public ResultCode TryGetNextSteadyClockAlarmSnapshot(ServiceCtx context)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return ResultCode.NotImplemented;
|
throw new ServiceNotImplementedException(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
StandardLocalSystemClock.MarkInitialized();
|
StandardLocalSystemClock.MarkInitialized();
|
||||||
|
|
||||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupStandardNetworkSystemClock(SystemClockContext clockContext, TimeSpanType sufficientAccuracy)
|
public void SetupStandardNetworkSystemClock(SystemClockContext clockContext, TimeSpanType sufficientAccuracy)
|
||||||
|
@ -133,7 +132,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
StandardNetworkSystemClock.MarkInitialized();
|
StandardNetworkSystemClock.MarkInitialized();
|
||||||
|
|
||||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupTimeZoneManager(string locationName, SteadyClockTimePoint timeZoneUpdatedTimePoint, uint totalLocationNameCount, UInt128 timeZoneRuleVersion, Stream timeZoneBinaryStream)
|
public void SetupTimeZoneManager(string locationName, SteadyClockTimePoint timeZoneUpdatedTimePoint, uint totalLocationNameCount, UInt128 timeZoneRuleVersion, Stream timeZoneBinaryStream)
|
||||||
|
@ -149,7 +147,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
TimeZone.Manager.MarkInitialized();
|
TimeZone.Manager.MarkInitialized();
|
||||||
|
|
||||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupEphemeralNetworkSystemClock()
|
public void SetupEphemeralNetworkSystemClock()
|
||||||
|
@ -158,7 +155,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
EphemeralNetworkSystemClock.MarkInitialized();
|
EphemeralNetworkSystemClock.MarkInitialized();
|
||||||
|
|
||||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupStandardUserSystemClock(KThread thread, bool isAutomaticCorrectionEnabled, SteadyClockTimePoint steadyClockTimePoint)
|
public void SetupStandardUserSystemClock(KThread thread, bool isAutomaticCorrectionEnabled, SteadyClockTimePoint steadyClockTimePoint)
|
||||||
|
@ -174,7 +170,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
||||||
SharedMemory.SetAutomaticCorrectionEnabled(isAutomaticCorrectionEnabled);
|
SharedMemory.SetAutomaticCorrectionEnabled(isAutomaticCorrectionEnabled);
|
||||||
|
|
||||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetStandardSteadyClockRtcOffset(KThread thread, TimeSpanType rtcOffset)
|
public void SetStandardSteadyClockRtcOffset(KThread thread, TimeSpanType rtcOffset)
|
||||||
|
|
|
@ -87,6 +87,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,6 +155,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
||||||
{
|
{
|
||||||
Nca nca = new Nca(_device.System.KeySet, ncaFileStream);
|
Nca nca = new Nca(_device.System.KeySet, ncaFileStream);
|
||||||
IFileSystem romfs = nca.OpenFileSystem(NcaSectionType.Data, _device.System.FsIntegrityCheckLevel);
|
IFileSystem romfs = nca.OpenFileSystem(NcaSectionType.Data, _device.System.FsIntegrityCheckLevel);
|
||||||
|
|
||||||
timeZoneBinaryStream = romfs.OpenFile($"zoneinfo/{locationName}", OpenMode.Read).AsStream();
|
timeZoneBinaryStream = romfs.OpenFile($"zoneinfo/{locationName}", OpenMode.Read).AsStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue