IApplicationRootService.cs 852 B

123456789101112131415161718192021222324252627
  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:u")]
  6. class IApplicationRootService : IpcService
  7. {
  8. public IApplicationRootService(ServiceCtx context) : base(context.Device.System.ViServer) { }
  9. [CommandHipc(0)]
  10. // GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService>
  11. public ResultCode GetDisplayService(ServiceCtx context)
  12. {
  13. ViServiceType serviceType = (ViServiceType)context.RequestData.ReadInt32();
  14. if (serviceType != ViServiceType.Application)
  15. {
  16. return ResultCode.InvalidRange;
  17. }
  18. MakeObject(context, new IApplicationDisplayService(serviceType));
  19. return ResultCode.Success;
  20. }
  21. }
  22. }