nfc/nfp: Implement ISystemManager and ISystem (#2381)
* nfc/nfp: Implement ISystemManager and ISystem This PR add permission levels for `nfc` and `nfp` services: - `nfc`: `CreateUserInterface` and `CreateSystemInterface` are implemented. - `INfc`: `Initialize` and `IsNfcEnabled` calls are stubbed. - `nfp`: `CreateDebugInterface` and `CreateSystemInterface` are implemented. - `INfp`: `GetRegisterInfo2` for `IDebug` and `ISystem` are implemented. * Addresses gdkchan feedback
This commit is contained in:
parent
aea7a6631c
commit
55e0c71489
24 changed files with 153 additions and 33 deletions
37
Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs
Normal file
37
Ryujinx.HLE/HOS/Services/Nfc/NfcManager/INfc.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using Ryujinx.Common.Logging;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Nfc.NfcManager
|
||||
{
|
||||
class INfc : IpcService
|
||||
{
|
||||
private NfcPermissionLevel _permissionLevel;
|
||||
|
||||
public INfc(NfcPermissionLevel permissionLevel)
|
||||
{
|
||||
_permissionLevel = permissionLevel;
|
||||
}
|
||||
|
||||
[CommandHipc(0)]
|
||||
[CommandHipc(400)] // 4.0.0+
|
||||
// Initialize()
|
||||
public ResultCode Initialize(ServiceCtx context)
|
||||
{
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandHipc(3)]
|
||||
[CommandHipc(403)] // 4.0.0+
|
||||
// IsNfcEnabled() -> b8
|
||||
public ResultCode IsNfcEnabled(ServiceCtx context)
|
||||
{
|
||||
// NOTE: Write false value here could make nfp service not called.
|
||||
context.ResponseData.Write(true);
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceNfc, new { _permissionLevel });
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue