IManagerRootService.cs 949 B

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