aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2018-03-23 14:26:11 +0200
committergdkchan <gab.dark.100@gmail.com>2018-03-23 09:26:11 -0300
commit0d2f07315248a38febec3b015673e3421a787c49 (patch)
tree0fb5e6da4e5e10a71b652b9a71a5acc86f6c78e8
parent423ae5d889163077a63684eb4c82f97d87998cac (diff)
implement isession:getperformanceconfiguration (#64)
-rw-r--r--Ryujinx.Core/OsHle/Services/Apm/ISession.cs16
-rw-r--r--Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs18
-rw-r--r--Ryujinx.Core/OsHle/Services/Apm/PerformanceMode.cs8
3 files changed, 39 insertions, 3 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Apm/ISession.cs b/Ryujinx.Core/OsHle/Services/Apm/ISession.cs
index a2faa01a..850ce803 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<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;
}
diff --git a/Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs b/Ryujinx.Core/OsHle/Services/Apm/PerformanceConfiguration.cs
new file mode 100644
index 00000000..5a4d072e
--- /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 00000000..db6ef407
--- /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
+ }
+}