0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs
Ac_K eda6b78894
apm/am: Refactoring/Unstub services (#1662)
* apm: Refactoring/Unstub service

This PR implement some IPC calls of apm service:
- nn::apm::IManager is fully implemented.
- nn::apm::ISession is fully implemented (close #1633).
- nn::apm::ISystemManager is partially implemented.

nn::appletAE::ICommonStateGetter have some calls which are just a layer of apm IPC calls. What we did in some calls was wrong, it's fixed now!

Everything is checked with RE.

* abstract Apm *Server as Thog requested

* abstract ISession and fix other classes

* Address gdkchan feedback

* Fix class

* Fix Logging
2020-11-08 17:00:54 -03:00

28 lines
No EOL
933 B
C#

namespace Ryujinx.HLE.HOS.Services.Apm
{
[Service("apm:sys")]
class SystemManagerServer : ISystemManager
{
private readonly ServiceCtx _context;
public SystemManagerServer(ServiceCtx context) : base(context)
{
_context = context;
}
protected override void RequestPerformanceMode(PerformanceMode performanceMode)
{
_context.Device.System.PerformanceState.PerformanceMode = performanceMode;
}
internal override void SetCpuBoostMode(CpuBoostMode cpuBoostMode)
{
_context.Device.System.PerformanceState.CpuBoostMode = cpuBoostMode;
}
protected override PerformanceConfiguration GetCurrentPerformanceConfiguration()
{
return _context.Device.System.PerformanceState.GetCurrentPerformanceConfiguration(_context.Device.System.PerformanceState.PerformanceMode);
}
}
}