aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Ptm
diff options
context:
space:
mode:
authorThog <me@thog.eu>2020-04-28 03:44:29 +0200
committerGitHub <noreply@github.com>2020-04-28 11:44:29 +1000
commit486f3163f399fb8751939bd7e9b31d0471e841d2 (patch)
treef70f5e2ba860f2e0fa75de053bc5176f82d45f94 /Ryujinx.HLE/HOS/Services/Ptm
parent59145acd7c339db162236699f143e16d4190b631 (diff)
Fix hbl 2.3.1 and hbmenu 3.3.0 (#1171)
* Fix hbl 2.3.1 and hbmenu 3.3.0 * log class: Add ServicePtm * fix build issue * do not cast titleId to byte * Address Ac_K's comment
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Ptm')
-rw-r--r--Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs20
-rw-r--r--Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs8
2 files changed, 27 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs
index f3b37d67..942fab87 100644
--- a/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs
+++ b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs
@@ -1,8 +1,26 @@
-namespace Ryujinx.HLE.HOS.Services.Ptm.Ts
+using Ryujinx.Common.Logging;
+using Ryujinx.HLE.HOS.Services.Ptm.Ts.Types;
+
+namespace Ryujinx.HLE.HOS.Services.Ptm.Ts
{
[Service("ts")]
class IMeasurementServer : IpcService
{
+ private const uint DefaultTemperature = 42000u;
+
public IMeasurementServer(ServiceCtx context) { }
+
+ [Command(3)]
+ // GetTemperatureMilliC(Location location) -> u32
+ public ResultCode GetTemperatureMilliC(ServiceCtx context)
+ {
+ Location location = (Location)context.RequestData.ReadByte();
+
+ Logger.PrintStub(LogClass.ServicePtm, new { location });
+
+ context.ResponseData.Write(DefaultTemperature);
+
+ return ResultCode.Success;
+ }
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs b/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs
new file mode 100644
index 00000000..e72491d5
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs
@@ -0,0 +1,8 @@
+namespace Ryujinx.HLE.HOS.Services.Ptm.Ts.Types
+{
+ enum Location : byte
+ {
+ Internal,
+ External
+ }
+}