aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Apm/ManagerServer.cs
blob: af051934440f1b75b47081d4637dfb26863ae7ce (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
29
30
31
namespace Ryujinx.HLE.HOS.Services.Apm
{
    [Service("apm")]
    [Service("apm:am")] // 8.0.0+
    class ManagerServer : IManager
    {
        private readonly ServiceCtx _context;

        public ManagerServer(ServiceCtx context) : base(context)
        {
            _context = context;
        }

        protected override ResultCode OpenSession(out SessionServer sessionServer)
        {
            sessionServer = new SessionServer(_context);

            return ResultCode.Success;
        }

        protected override PerformanceMode GetPerformanceMode()
        {
            return _context.Device.System.PerformanceState.PerformanceMode;
        }

        protected override bool IsCpuOverclockEnabled()
        {
            return _context.Device.System.PerformanceState.CpuOverclockEnabled;
        }
    }
}