From d21b403886fdc00dac2493532b3e8ff53d5882c4 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Sun, 3 Jul 2022 10:17:24 +0200 Subject: [PATCH] Stub GetTemperature (#3429) --- .../HOS/Services/Ptm/Ts/IMeasurementServer.cs | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs index be503bf4fd..d5a30097b4 100644 --- a/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs +++ b/Ryujinx.HLE/HOS/Services/Ptm/Ts/IMeasurementServer.cs @@ -6,13 +6,13 @@ namespace Ryujinx.HLE.HOS.Services.Ptm.Ts [Service("ts")] class IMeasurementServer : IpcService { - private const uint DefaultTemperature = 42000u; + private const uint DefaultTemperature = 42u; public IMeasurementServer(ServiceCtx context) { } - [CommandHipc(3)] - // GetTemperatureMilliC(Location location) -> u32 - public ResultCode GetTemperatureMilliC(ServiceCtx context) + [CommandHipc(1)] + // GetTemperature(Location location) -> u32 + public ResultCode GetTemperature(ServiceCtx context) { Location location = (Location)context.RequestData.ReadByte(); @@ -22,5 +22,18 @@ namespace Ryujinx.HLE.HOS.Services.Ptm.Ts return ResultCode.Success; } + + [CommandHipc(3)] + // GetTemperatureMilliC(Location location) -> u32 + public ResultCode GetTemperatureMilliC(ServiceCtx context) + { + Location location = (Location)context.RequestData.ReadByte(); + + Logger.Stub?.PrintStub(LogClass.ServicePtm, new { location }); + + context.ResponseData.Write(DefaultTemperature * 1000); + + return ResultCode.Success; + } } } \ No newline at end of file