mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-07-06 19:19:04 +00:00
Move solution and projects to src
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc
|
||||
{
|
||||
[Service("bpc")]
|
||||
class IBoardPowerControlManager : IpcService
|
||||
{
|
||||
public IBoardPowerControlManager(ServiceCtx context) { }
|
||||
}
|
||||
}
|
||||
32
src/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IRtcManager.cs
Normal file
32
src/Ryujinx.HLE/HOS/Services/Pcv/Bpc/IRtcManager.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Pcv.Bpc
|
||||
{
|
||||
[Service("bpc:r")] // 1.0.0 - 8.1.0
|
||||
class IRtcManager : IpcService
|
||||
{
|
||||
public IRtcManager(ServiceCtx context) { }
|
||||
|
||||
[CommandCmif(0)]
|
||||
// GetRtcTime() -> u64
|
||||
public ResultCode GetRtcTime(ServiceCtx context)
|
||||
{
|
||||
ResultCode result = GetExternalRtcValue(out ulong rtcValue);
|
||||
|
||||
if (result == ResultCode.Success)
|
||||
{
|
||||
context.ResponseData.Write(rtcValue);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultCode GetExternalRtcValue(out ulong rtcValue)
|
||||
{
|
||||
// TODO: emulate MAX77620/MAX77812 RTC
|
||||
rtcValue = (ulong)(DateTime.Now.ToUniversalTime() - DateTime.UnixEpoch).TotalSeconds;
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user