aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/Services/Apm/ISession.cs
blob: 3c9bf07c4d60d3062a17c0b4778e037ac3a5579d (plain)
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
32
33
34
35
36
37
38
39
40
41
using Ryujinx.HLE.Logging;
using Ryujinx.HLE.OsHle.Ipc;
using System.Collections.Generic;

namespace Ryujinx.HLE.OsHle.Services.Apm
{
    class ISession : IpcService
    {
        private Dictionary<int, ServiceProcessRequest> m_Commands;

        public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;

        public ISession()
        {
            m_Commands = new Dictionary<int, ServiceProcessRequest>()
            {
                { 0, SetPerformanceConfiguration },
                { 1, GetPerformanceConfiguration }
            };
        }

        public long SetPerformanceConfiguration(ServiceCtx Context)
        {
            PerformanceMode          PerfMode   = (PerformanceMode)Context.RequestData.ReadInt32();
            PerformanceConfiguration PerfConfig = (PerformanceConfiguration)Context.RequestData.ReadInt32();

            return 0;
        }

        public long GetPerformanceConfiguration(ServiceCtx Context)
        {
            PerformanceMode PerfMode = (PerformanceMode)Context.RequestData.ReadInt32();

            Context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);

            Context.Ns.Log.PrintStub(LogClass.ServiceApm, "Stubbed.");

            return 0;
        }
    }
}