mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 23:35:30 +00:00
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
This commit is contained in:
parent
59145acd7c
commit
486f3163f3
|
@ -40,6 +40,7 @@ namespace Ryujinx.Common.Logging
|
|||
ServicePl,
|
||||
ServicePrepo,
|
||||
ServicePsm,
|
||||
ServicePtm,
|
||||
ServiceSet,
|
||||
ServiceSfdnsres,
|
||||
ServiceSm,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
public ResultCode GetApplicationControlData(ServiceCtx context)
|
||||
{
|
||||
byte source = (byte)context.RequestData.ReadInt64();
|
||||
ulong titleId = (byte)context.RequestData.ReadUInt64();
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
|
||||
long position = context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Ns
|
||||
{
|
||||
class IReadOnlyApplicationControlDataInterface : IpcService
|
||||
{
|
||||
public IReadOnlyApplicationControlDataInterface(ServiceCtx context) { }
|
||||
|
||||
[Command(0)]
|
||||
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
|
||||
public ResultCode GetApplicationControlData(ServiceCtx context)
|
||||
{
|
||||
byte source = (byte)context.RequestData.ReadInt64();
|
||||
ulong titleId = context.RequestData.ReadUInt64();
|
||||
|
||||
long position = context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
byte[] nacpData = context.Device.System.ControlData.ByteSpan.ToArray();
|
||||
|
||||
context.Memory.WriteBytes(position, nacpData);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,5 +17,14 @@ namespace Ryujinx.HLE.HOS.Services.Ns
|
|||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(7989)]
|
||||
// GetReadOnlyApplicationControlDataInterface() -> object<nn::ns::detail::IReadOnlyApplicationControlDataInterface>
|
||||
public ResultCode GetReadOnlyApplicationControlDataInterface(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IReadOnlyApplicationControlDataInterface(context));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
8
Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs
Normal file
8
Ryujinx.HLE/HOS/Services/Ptm/Ts/Types/Location.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ryujinx.HLE.HOS.Services.Ptm.Ts.Types
|
||||
{
|
||||
enum Location : byte
|
||||
{
|
||||
Internal,
|
||||
External
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue