diff options
| author | Thog <me@thog.eu> | 2020-04-28 03:44:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-28 11:44:29 +1000 |
| commit | 486f3163f399fb8751939bd7e9b31d0471e841d2 (patch) | |
| tree | f70f5e2ba860f2e0fa75de053bc5176f82d45f94 /Ryujinx.HLE/HOS/Services/Ptm | |
| parent | 59145acd7c339db162236699f143e16d4190b631 (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.cs | 20 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs | 8 |
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 + } +} |
