ISystemDisplayService.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Services.Vi
  3. {
  4. class ISystemDisplayService : IpcService
  5. {
  6. private static IApplicationDisplayService _applicationDisplayService;
  7. public ISystemDisplayService(IApplicationDisplayService applicationDisplayService)
  8. {
  9. _applicationDisplayService = applicationDisplayService;
  10. }
  11. [Command(2205)]
  12. // SetLayerZ(u64, u64)
  13. public static long SetLayerZ(ServiceCtx context)
  14. {
  15. Logger.PrintStub(LogClass.ServiceVi);
  16. return 0;
  17. }
  18. [Command(2207)]
  19. // SetLayerVisibility(b8, u64)
  20. public static long SetLayerVisibility(ServiceCtx context)
  21. {
  22. Logger.PrintStub(LogClass.ServiceVi);
  23. return 0;
  24. }
  25. [Command(2312)] // 1.0.0-6.2.0
  26. // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>)
  27. public static long CreateStrayLayer(ServiceCtx context)
  28. {
  29. Logger.PrintStub(LogClass.ServiceVi);
  30. return _applicationDisplayService.CreateStrayLayer(context);
  31. }
  32. [Command(3200)]
  33. // GetDisplayMode(u64) -> nn::vi::DisplayModeInfo
  34. public static long GetDisplayMode(ServiceCtx context)
  35. {
  36. // TODO: De-hardcode resolution.
  37. context.ResponseData.Write(1280);
  38. context.ResponseData.Write(720);
  39. context.ResponseData.Write(60.0f);
  40. context.ResponseData.Write(0);
  41. return 0;
  42. }
  43. }
  44. }