Ryujinx/Ryujinx.HLE/HOS/Services/Apm/ISession.cs

41 lines
1.2 KiB
C#
Raw Normal View History

using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Services.Apm
{
class ISession : IpcService
{
2018-12-01 21:01:59 +01:00
private Dictionary<int, ServiceProcessRequest> _commands;
2018-12-01 21:01:59 +01:00
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
public ISession()
{
2018-12-01 21:01:59 +01:00
_commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, SetPerformanceConfiguration },
{ 1, GetPerformanceConfiguration }
};
}
2018-12-01 21:01:59 +01:00
public long SetPerformanceConfiguration(ServiceCtx context)
{
2018-12-01 21:01:59 +01:00
PerformanceMode perfMode = (PerformanceMode)context.RequestData.ReadInt32();
PerformanceConfiguration perfConfig = (PerformanceConfiguration)context.RequestData.ReadInt32();
return 0;
}
2018-12-01 21:01:59 +01:00
public long GetPerformanceConfiguration(ServiceCtx context)
{
2018-12-01 21:01:59 +01:00
PerformanceMode perfMode = (PerformanceMode)context.RequestData.ReadInt32();
2018-12-01 21:01:59 +01:00
context.ResponseData.Write((uint)PerformanceConfiguration.PerformanceConfiguration1);
Logger.PrintStub(LogClass.ServiceApm, "Stubbed.");
return 0;
}
}
}