ISystemDisplayService.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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> _commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
  10. public ISystemDisplayService(IApplicationDisplayService applicationDisplayService)
  11. {
  12. _commands = new Dictionary<int, ServiceProcessRequest>
  13. {
  14. { 2205, SetLayerZ },
  15. { 2207, SetLayerVisibility },
  16. { 2312, applicationDisplayService.CreateStrayLayer },
  17. { 3200, GetDisplayMode }
  18. };
  19. }
  20. public static long SetLayerZ(ServiceCtx context)
  21. {
  22. Logger.PrintStub(LogClass.ServiceVi);
  23. return 0;
  24. }
  25. public static long SetLayerVisibility(ServiceCtx context)
  26. {
  27. Logger.PrintStub(LogClass.ServiceVi);
  28. return 0;
  29. }
  30. public static long GetDisplayMode(ServiceCtx context)
  31. {
  32. //TODO: De-hardcode resolution.
  33. context.ResponseData.Write(1280);
  34. context.ResponseData.Write(720);
  35. context.ResponseData.Write(60.0f);
  36. context.ResponseData.Write(0);
  37. return 0;
  38. }
  39. }
  40. }