mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-23 06:42:44 +00:00
6d28b64312
* ts: Migrate service to Horizon project This PR migrate the `ts` service (stored in `ptm`) to the Horizon project: - It stubs all known IPCs. - IpcServer consts are checked by RE. Closes #6480 * Fix args
48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using Ryujinx.Common.Logging;
|
|
using Ryujinx.Horizon.Common;
|
|
using Ryujinx.Horizon.Ptm.Ipc;
|
|
using Ryujinx.Horizon.Sdk.Sf;
|
|
using Ryujinx.Horizon.Sdk.Ts;
|
|
|
|
namespace Ryujinx.Horizon.Ts.Ipc
|
|
{
|
|
partial class Session : ISession
|
|
{
|
|
private readonly DeviceCode _deviceCode;
|
|
|
|
public Session(DeviceCode deviceCode)
|
|
{
|
|
_deviceCode = deviceCode;
|
|
}
|
|
|
|
[CmifCommand(0)]
|
|
public Result GetTemperatureRange(out int minimumTemperature, out int maximumTemperature)
|
|
{
|
|
Logger.Stub?.PrintStub(LogClass.ServicePtm, new { _deviceCode });
|
|
|
|
minimumTemperature = MeasurementServer.MinimumTemperature;
|
|
maximumTemperature = MeasurementServer.MaximumTemperature;
|
|
|
|
return Result.Success;
|
|
}
|
|
|
|
[CmifCommand(2)]
|
|
public Result SetMeasurementMode(byte measurementMode)
|
|
{
|
|
Logger.Stub?.PrintStub(LogClass.ServicePtm, new { _deviceCode, measurementMode });
|
|
|
|
return Result.Success;
|
|
}
|
|
|
|
[CmifCommand(4)]
|
|
public Result GetTemperature(out int temperature)
|
|
{
|
|
Logger.Stub?.PrintStub(LogClass.ServicePtm, new { _deviceCode });
|
|
|
|
temperature = MeasurementServer.DefaultTemperature;
|
|
|
|
return Result.Success;
|
|
}
|
|
}
|
|
}
|