ISystemDisplayService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.HLE.HOS.Services.Vi
  5. {
  6. class ISystemDisplayService : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> m_Commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  10. public ISystemDisplayService()
  11. {
  12. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  13. {
  14. { 2205, SetLayerZ },
  15. { 2207, SetLayerVisibility },
  16. { 3200, GetDisplayMode }
  17. };
  18. }
  19. public static long SetLayerZ(ServiceCtx Context)
  20. {
  21. Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
  22. return 0;
  23. }
  24. public static long SetLayerVisibility(ServiceCtx Context)
  25. {
  26. Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
  27. return 0;
  28. }
  29. public static long GetDisplayMode(ServiceCtx Context)
  30. {
  31. //TODO: De-hardcode resolution.
  32. Context.ResponseData.Write(1280);
  33. Context.ResponseData.Write(720);
  34. Context.ResponseData.Write(60.0f);
  35. Context.ResponseData.Write(0);
  36. return 0;
  37. }
  38. }
  39. }