IWindowController.cs 1012 B

123456789101112131415161718192021222324252627282930313233343536
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
  3. {
  4. class IWindowController : IpcService
  5. {
  6. private readonly long _pid;
  7. public IWindowController(long pid)
  8. {
  9. _pid = pid;
  10. }
  11. [CommandHipc(1)]
  12. // GetAppletResourceUserId() -> nn::applet::AppletResourceUserId
  13. public ResultCode GetAppletResourceUserId(ServiceCtx context)
  14. {
  15. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  16. long appletResourceUserId = context.Device.System.AppletState.AppletResourceUserIds.Add(_pid);
  17. context.ResponseData.Write(appletResourceUserId);
  18. return ResultCode.Success;
  19. }
  20. [CommandHipc(10)]
  21. // AcquireForegroundRights()
  22. public ResultCode AcquireForegroundRights(ServiceCtx context)
  23. {
  24. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  25. return ResultCode.Success;
  26. }
  27. }
  28. }