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()
|
||||
{
|
||||
_sharedMemory.UpdateLocalSystemClockContext(_context);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
protected override ResultCode Update()
|
||||
{
|
||||
_sharedMemory.UpdateNetworkSystemClockContext(_context);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
|
|||
|
||||
SystemClockContext clockContext = new SystemClockContext()
|
||||
{
|
||||
Offset = posixTime - currentTimePoint.TimePoint,
|
||||
Offset = posixTime - currentTimePoint.TimePoint,
|
||||
SteadyTimePoint = currentTimePoint
|
||||
};
|
||||
|
||||
|
|
|
@ -121,9 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
{
|
||||
if (!NxSettings.Settings.TryGetValue("time!standard_user_clock_initial_year", out object standardUserSystemClockInitialYear))
|
||||
{
|
||||
// Fallback if not found in settings (nintendo actually abort here)
|
||||
standardUserSystemClockInitialYear = 2019;
|
||||
//throw new System.InvalidOperationException("standard_user_clock_initial_year isn't defined in system settings!");
|
||||
throw new System.InvalidOperationException("standard_user_clock_initial_year isn't defined in system settings!");
|
||||
}
|
||||
|
||||
context.ResponseData.Write((int)standardUserSystemClockInitialYear);
|
||||
|
|
|
@ -102,6 +102,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
public ResultCode SetupStandardUserSystemClock(ServiceCtx context)
|
||||
{
|
||||
bool isAutomaticCorrectionEnabled = context.RequestData.ReadBoolean();
|
||||
|
||||
context.RequestData.BaseStream.Position += 7;
|
||||
|
||||
SteadyClockTimePoint steadyClockTimePoint = context.RequestData.ReadStruct<SteadyClockTimePoint>();
|
||||
|
@ -196,7 +197,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
public ResultCode GetAlarmRegistrationEvent(ServiceCtx context)
|
||||
{
|
||||
// TODO
|
||||
return ResultCode.NotImplemented;
|
||||
throw new ServiceNotImplementedException(context);
|
||||
}
|
||||
|
||||
[Command(201)]
|
||||
|
@ -204,7 +205,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
public ResultCode UpdateSteadyAlarms(ServiceCtx context)
|
||||
{
|
||||
// TODO
|
||||
return ResultCode.NotImplemented;
|
||||
throw new ServiceNotImplementedException(context);
|
||||
}
|
||||
|
||||
[Command(202)]
|
||||
|
@ -212,7 +213,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
public ResultCode TryGetNextSteadyClockAlarmSnapshot(ServiceCtx context)
|
||||
{
|
||||
// TODO
|
||||
return ResultCode.NotImplemented;
|
||||
throw new ServiceNotImplementedException(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.StaticService
|
|||
{
|
||||
private SteadyClockCore _steadyClock;
|
||||
private bool _writePermission;
|
||||
private bool _bypassUninitializedClock;
|
||||
private bool _bypassUninitializedClock;
|
||||
|
||||
public ISteadyClock(SteadyClockCore steadyClock, bool writePermission, bool bypassUninitializedClock)
|
||||
{
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace Ryujinx.HLE.HOS.Services.Time.StaticService
|
|||
{
|
||||
class ITimeZoneServiceForGlue : IpcService
|
||||
{
|
||||
private TimeZoneContentManager _timeZoneContentManager;
|
||||
private ITimeZoneServiceForPsc _inner;
|
||||
private bool _writePermission;
|
||||
private TimeZoneContentManager _timeZoneContentManager;
|
||||
private ITimeZoneServiceForPsc _inner;
|
||||
private bool _writePermission;
|
||||
|
||||
public ITimeZoneServiceForGlue(TimeZoneContentManager timeZoneContentManager, bool writePermission)
|
||||
{
|
||||
|
|
|
@ -117,7 +117,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
StandardLocalSystemClock.MarkInitialized();
|
||||
|
||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||
|
||||
}
|
||||
|
||||
public void SetupStandardNetworkSystemClock(SystemClockContext clockContext, TimeSpanType sufficientAccuracy)
|
||||
|
@ -133,7 +132,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
StandardNetworkSystemClock.MarkInitialized();
|
||||
|
||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||
|
||||
}
|
||||
|
||||
public void SetupEphemeralNetworkSystemClock()
|
||||
|
@ -158,7 +155,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
EphemeralNetworkSystemClock.MarkInitialized();
|
||||
|
||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||
|
||||
}
|
||||
|
||||
public void SetupStandardUserSystemClock(KThread thread, bool isAutomaticCorrectionEnabled, SteadyClockTimePoint steadyClockTimePoint)
|
||||
|
@ -174,7 +170,6 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
SharedMemory.SetAutomaticCorrectionEnabled(isAutomaticCorrectionEnabled);
|
||||
|
||||
// TODO: propagate IPC late binding of "time:s" and "time:p"
|
||||
|
||||
}
|
||||
|
||||
public void SetStandardSteadyClockRtcOffset(KThread thread, TimeSpanType rtcOffset)
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -152,8 +153,9 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|||
|
||||
using (IStorage ncaFileStream = new LocalStorage(_device.FileSystem.SwitchPathToSystemPath(GetTimeZoneBinaryTitleContentPath()), FileAccess.Read, FileMode.Open))
|
||||
{
|
||||
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);
|
||||
|
||||
timeZoneBinaryStream = romfs.OpenFile($"zoneinfo/{locationName}", OpenMode.Read).AsStream();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue