aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Apm/SystemManagerServer.cs
blob: e8b7d12aabae19580b3dd1226c840c5478de1765 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
        }
    }
}