Implement IStaticService 100 & 101

This commit is contained in:
Thog 2019-07-14 17:07:33 +02:00
commit b3e53f7a23
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
2 changed files with 19 additions and 1 deletions

View file

@ -66,7 +66,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.Clock
if (_autoCorrectionEnabled != autoCorrectionEnabled && _networkSystemClockCore.IsClockSetup(thread)) if (_autoCorrectionEnabled != autoCorrectionEnabled && _networkSystemClockCore.IsClockSetup(thread))
{ {
result = _networkSystemClockCore.GetSystemClockContext(thread, out SystemClockContext context); result = _networkSystemClockCore.GetSystemClockContext(thread, out SystemClockContext context);
if (result == 0) if (result == 0)
{ {
_localSystemClockCore.SetSystemClockContext(context); _localSystemClockCore.SetSystemClockContext(context);

View file

@ -78,6 +78,24 @@ namespace Ryujinx.HLE.HOS.Services.Time
return ResultCode.Success; return ResultCode.Success;
} }
[Command(100)]
// IsStandardUserSystemClockAutomaticCorrectionEnabled() -> bool
public ResultCode IsStandardUserSystemClockAutomaticCorrectionEnabled(ServiceCtx context)
{
context.ResponseData.Write(StandardUserSystemClockCore.Instance.IsAutomaticCorrectionEnabled());
return ResultCode.Success;
}
[Command(101)]
// SetStandardUserSystemClockAutomaticCorrectionEnabled(b8)
public ResultCode SetStandardUserSystemClockAutomaticCorrectionEnabled(ServiceCtx context)
{
bool autoCorrectionEnabled = context.RequestData.ReadBoolean();
return StandardUserSystemClockCore.Instance.SetAutomaticCorrectionEnabled(context.Thread, autoCorrectionEnabled);
}
[Command(300)] // 4.0.0+ [Command(300)] // 4.0.0+
// CalculateMonotonicSystemClockBaseTimePoint(nn::time::SystemClockContext) -> u64 // CalculateMonotonicSystemClockBaseTimePoint(nn::time::SystemClockContext) -> u64
public ResultCode CalculateMonotonicSystemClockBaseTimePoint(ServiceCtx context) public ResultCode CalculateMonotonicSystemClockBaseTimePoint(ServiceCtx context)