/ src / Ryujinx.HLE / HOS / Services / Vi / ISystemRootService.cs
ISystemRootService.cs
 1  using Ryujinx.HLE.HOS.Services.Vi.RootService;
 2  using Ryujinx.HLE.HOS.Services.Vi.Types;
 3  
 4  namespace Ryujinx.HLE.HOS.Services.Vi
 5  {
 6      [Service("vi:s")]
 7      class ISystemRootService : IpcService
 8      {
 9          // vi:u/m/s aren't on 3 separate threads but we can't put them together with the current ServerBase
10          public ISystemRootService(ServiceCtx context) : base(context.Device.System.ViServerS) { }
11  
12          [CommandCmif(1)]
13          // GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService>
14          public ResultCode GetDisplayService(ServiceCtx context)
15          {
16              ViServiceType serviceType = (ViServiceType)context.RequestData.ReadInt32();
17  
18              if (serviceType != ViServiceType.System)
19              {
20                  return ResultCode.PermissionDenied;
21              }
22  
23              MakeObject(context, new IApplicationDisplayService(serviceType));
24  
25              return ResultCode.Success;
26          }
27      }
28  }