pctl: refactoring IParentalControlServiceFactory and IParentalControl… (#1219)
* pctl: refactoring IParentalControlServiceFactory and IParentalControlService call Our previous implementation was totally guessed. Now it's implemented according to RE, even if it's stubbed because we will not support Parental Control for now. * unknownFlag > permissionFlag
This commit is contained in:
parent
430a48338b
commit
b2e5855928
3 changed files with 82 additions and 19 deletions
|
@ -2,19 +2,25 @@ using Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Pctl
|
||||
{
|
||||
[Service("pctl")]
|
||||
[Service("pctl:a")]
|
||||
[Service("pctl:r")]
|
||||
[Service("pctl:s")]
|
||||
[Service("pctl", 0x303)]
|
||||
[Service("pctl:a", 0x83BE)]
|
||||
[Service("pctl:r", 0x8040)]
|
||||
[Service("pctl:s", 0x838E)]
|
||||
class IParentalControlServiceFactory : IpcService
|
||||
{
|
||||
public IParentalControlServiceFactory(ServiceCtx context) { }
|
||||
private int _permissionFlag;
|
||||
|
||||
public IParentalControlServiceFactory(ServiceCtx context, int permissionFlag)
|
||||
{
|
||||
_permissionFlag = permissionFlag;
|
||||
}
|
||||
|
||||
[Command(0)]
|
||||
// CreateService(u64, pid) -> object<nn::pctl::detail::ipc::IParentalControlService>
|
||||
public ResultCode CreateService(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IParentalControlService());
|
||||
// TODO: Should pass the pid.
|
||||
MakeObject(context, new IParentalControlService(context, true, _permissionFlag));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -23,7 +29,8 @@ namespace Ryujinx.HLE.HOS.Services.Pctl
|
|||
// CreateServiceWithoutInitialize(u64, pid) -> object<nn::pctl::detail::ipc::IParentalControlService>
|
||||
public ResultCode CreateServiceWithoutInitialize(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IParentalControlService(false));
|
||||
// TODO: Should pass the pid.
|
||||
MakeObject(context, new IParentalControlService(context, false, _permissionFlag));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue