diff --git a/Ryujinx.Core/OsHle/Services/Apm/ISession.cs b/Ryujinx.Core/OsHle/Services/Apm/ISession.cs index a2faa01a4d..850ce803f1 100644 --- a/Ryujinx.Core/OsHle/Services/Apm/ISession.cs +++ b/Ryujinx.Core/OsHle/Services/Apm/ISession.cs @@ -13,14 +13,24 @@ namespace Ryujinx.Core.OsHle.Services.Apm { m_Commands = new Dictionary() { - { 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; } diff --git a/Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs b/Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs new file mode 100644 index 0000000000..5a4d072e22 --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs @@ -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 + } +} diff --git a/Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs b/Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs new file mode 100644 index 0000000000..db6ef4072f --- /dev/null +++ b/Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs @@ -0,0 +1,8 @@ +namespace Ryujinx.Core.OsHle.Services.Apm +{ + enum PerformanceMode + { + Handheld = 0, + Docked = 1 + } +}