2018-10-17 13:15:50 -04:00
|
|
|
using Ryujinx.Common.Logging;
|
2018-02-09 19:14:55 -05:00
|
|
|
|
2019-09-18 20:45:11 -04:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2018-03-19 14:58:46 -04:00
|
|
|
class ISystemDisplayService : IpcService
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2019-07-11 21:13:43 -04:00
|
|
|
private static IApplicationDisplayService _applicationDisplayService;
|
2018-02-09 19:14:55 -05:00
|
|
|
|
2019-01-05 16:26:16 -05:00
|
|
|
public ISystemDisplayService(IApplicationDisplayService applicationDisplayService)
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2019-07-11 21:13:43 -04:00
|
|
|
_applicationDisplayService = applicationDisplayService;
|
2018-02-09 19:14:55 -05:00
|
|
|
}
|
|
|
|
|
2019-07-11 21:13:43 -04:00
|
|
|
[Command(2205)]
|
|
|
|
// SetLayerZ(u64, u64)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode SetLayerZ(ServiceCtx context)
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceVi);
|
2018-08-16 19:47:36 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-02-09 19:14:55 -05:00
|
|
|
}
|
2018-04-04 18:16:59 -04:00
|
|
|
|
2019-07-11 21:13:43 -04:00
|
|
|
[Command(2207)]
|
|
|
|
// SetLayerVisibility(b8, u64)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode SetLayerVisibility(ServiceCtx context)
|
2018-04-04 18:16:59 -04:00
|
|
|
{
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceVi);
|
2018-08-16 19:47:36 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-05-10 22:40:52 -04:00
|
|
|
}
|
|
|
|
|
2019-07-11 21:13:43 -04:00
|
|
|
[Command(2312)] // 1.0.0-6.2.0
|
|
|
|
// CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode CreateStrayLayer(ServiceCtx context)
|
2019-07-11 21:13:43 -04:00
|
|
|
{
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceVi);
|
2019-07-11 21:13:43 -04:00
|
|
|
|
|
|
|
return _applicationDisplayService.CreateStrayLayer(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
[Command(3200)]
|
|
|
|
// GetDisplayMode(u64) -> nn::vi::DisplayModeInfo
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode GetDisplayMode(ServiceCtx context)
|
2018-05-10 22:40:52 -04:00
|
|
|
{
|
2019-07-01 22:39:22 -04:00
|
|
|
// TODO: De-hardcode resolution.
|
2018-12-06 06:16:24 -05:00
|
|
|
context.ResponseData.Write(1280);
|
|
|
|
context.ResponseData.Write(720);
|
|
|
|
context.ResponseData.Write(60.0f);
|
|
|
|
context.ResponseData.Write(0);
|
2018-08-16 19:47:36 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-04 18:16:59 -04:00
|
|
|
}
|
2018-02-09 19:14:55 -05:00
|
|
|
}
|
|
|
|
}
|