mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
implement isession:getperformanceconfiguration (#64)
This commit is contained in:
parent
423ae5d889
commit
0d2f073152
3 changed files with 39 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
18
Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs
Normal file
18
Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs
Normal 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
|
||||
}
|
||||
}
|
8
Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs
Normal file
8
Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.Core.OsHle.Services.Apm
|
||||
{
|
||||
enum PerformanceMode
|
||||
{
|
||||
Handheld = 0,
|
||||
Docked = 1
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue