implement isession:getperformanceconfiguration (#64)

This commit is contained in:
emmauss 2018-03-23 14:26:11 +02:00 committed by gdkchan
parent 423ae5d889
commit 0d2f073152
3 changed files with 39 additions and 3 deletions

View file

@ -13,14 +13,24 @@ namespace Ryujinx.Core.OsHle.Services.Apm
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, SetPerformanceConfiguration }
{ 0, SetPerformanceConfiguration },
{ 1, GetPerformanceConfiguration }
};
}
public long SetPerformanceConfiguration(ServiceCtx Context)
{
int PerfMode = Context.RequestData.ReadInt32();
int PerfConfig = Context.RequestData.ReadInt32();
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);
return 0;
}

View file

@ -0,0 +1,18 @@
namespace Ryujinx.Core.OsHle.Services.Apm
{
enum PerformanceConfiguration : uint
{
PerformanceConfiguration1 = 0x00010000,
PerformanceConfiguration2 = 0x00010001,
PerformanceConfiguration3 = 0x00010002,
PerformanceConfiguration4 = 0x00020000,
PerformanceConfiguration5 = 0x00020001,
PerformanceConfiguration6 = 0x00020002,
PerformanceConfiguration7 = 0x00020003,
PerformanceConfiguration8 = 0x00020004,
PerformanceConfiguration9 = 0x00020005,
PerformanceConfiguration10 = 0x00020006,
PerformanceConfiguration11 = 0x92220007,
PerformanceConfiguration12 = 0x92220008
}
}

View file

@ -0,0 +1,8 @@
namespace Ryujinx.Core.OsHle.Services.Apm
{
enum PerformanceMode
{
Handheld = 0,
Docked = 1
}
}