aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService
diff options
context:
space:
mode:
authorTSR Berry <20988865+TSRBerry@users.noreply.github.com>2023-04-08 01:22:00 +0200
committerMary <thog@protonmail.com>2023-04-27 23:51:14 +0200
commitcee712105850ac3385cd0091a923438167433f9f (patch)
tree4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService
parentcd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff)
Move solution and projects to src
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService')
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs19
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs80
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs59
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs11
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs16
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs11
6 files changed, 0 insertions, 196 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs
deleted file mode 100644
index 1fa99e65..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
-{
- static class AndroidSurfaceComposerClient
- {
- // NOTE: This is android::SurfaceComposerClient::getDisplayInfo.
- public static (ulong, ulong) GetDisplayInfo(ServiceCtx context, ulong displayId = 0)
- {
- // TODO: This need to be REd, it should returns the driver resolution and more.
- if (context.Device.System.State.DockedMode)
- {
- return (1920, 1080);
- }
- else
- {
- return (1280, 720);
- }
- }
- }
-} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs
deleted file mode 100644
index 6093381c..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/IManagerDisplayService.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-using Ryujinx.Common.Logging;
-
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
-{
- class IManagerDisplayService : IpcService
- {
- private IApplicationDisplayService _applicationDisplayService;
-
- public IManagerDisplayService(IApplicationDisplayService applicationDisplayService)
- {
- _applicationDisplayService = applicationDisplayService;
- }
-
- [CommandCmif(1102)]
- // GetDisplayResolution(u64 display_id) -> (u64 width, u64 height)
- public ResultCode GetDisplayResolution(ServiceCtx context)
- {
- ulong displayId = context.RequestData.ReadUInt64();
-
- (ulong width, ulong height) = AndroidSurfaceComposerClient.GetDisplayInfo(context, displayId);
-
- context.ResponseData.Write(width);
- context.ResponseData.Write(height);
-
- return ResultCode.Success;
- }
-
- [CommandCmif(2010)]
- // CreateManagedLayer(u32, u64, nn::applet::AppletResourceUserId) -> u64
- public ResultCode CreateManagedLayer(ServiceCtx context)
- {
- long layerFlags = context.RequestData.ReadInt64();
- long displayId = context.RequestData.ReadInt64();
- long appletResourceUserId = context.RequestData.ReadInt64();
-
- ulong pid = context.Device.System.AppletState.AppletResourceUserIds.GetData<ulong>((int)appletResourceUserId);
-
- context.Device.System.SurfaceFlinger.CreateLayer(out long layerId, pid);
- context.Device.System.SurfaceFlinger.SetRenderLayer(layerId);
-
- context.ResponseData.Write(layerId);
-
- return ResultCode.Success;
- }
-
- [CommandCmif(2011)]
- // DestroyManagedLayer(u64)
- public ResultCode DestroyManagedLayer(ServiceCtx context)
- {
- long layerId = context.RequestData.ReadInt64();
-
- return context.Device.System.SurfaceFlinger.DestroyManagedLayer(layerId);
- }
-
- [CommandCmif(2012)] // 7.0.0+
- // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>)
- public ResultCode CreateStrayLayer(ServiceCtx context)
- {
- return _applicationDisplayService.CreateStrayLayer(context);
- }
-
- [CommandCmif(6000)]
- // AddToLayerStack(u32, u64)
- public ResultCode AddToLayerStack(ServiceCtx context)
- {
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return ResultCode.Success;
- }
-
- [CommandCmif(6002)]
- // SetLayerVisibility(b8, u64)
- public ResultCode SetLayerVisibility(ServiceCtx context)
- {
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return ResultCode.Success;
- }
- }
-} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs
deleted file mode 100644
index a24aa079..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/ISystemDisplayService.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Ryujinx.Common.Logging;
-
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
-{
- class ISystemDisplayService : IpcService
- {
- private IApplicationDisplayService _applicationDisplayService;
-
- public ISystemDisplayService(IApplicationDisplayService applicationDisplayService)
- {
- _applicationDisplayService = applicationDisplayService;
- }
-
- [CommandCmif(2205)]
- // SetLayerZ(u64, u64)
- public ResultCode SetLayerZ(ServiceCtx context)
- {
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return ResultCode.Success;
- }
-
- [CommandCmif(2207)]
- // SetLayerVisibility(b8, u64)
- public ResultCode SetLayerVisibility(ServiceCtx context)
- {
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return ResultCode.Success;
- }
-
- [CommandCmif(2312)] // 1.0.0-6.2.0
- // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>)
- public ResultCode CreateStrayLayer(ServiceCtx context)
- {
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return _applicationDisplayService.CreateStrayLayer(context);
- }
-
- [CommandCmif(3200)]
- // GetDisplayMode(u64) -> nn::vi::DisplayModeInfo
- public ResultCode GetDisplayMode(ServiceCtx context)
- {
- ulong displayId = context.RequestData.ReadUInt64();
-
- (ulong width, ulong height) = AndroidSurfaceComposerClient.GetDisplayInfo(context, displayId);
-
- context.ResponseData.Write((uint)width);
- context.ResponseData.Write((uint)height);
- context.ResponseData.Write(60.0f);
- context.ResponseData.Write(0);
-
- Logger.Stub?.PrintStub(LogClass.ServiceVi);
-
- return ResultCode.Success;
- }
- }
-} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs
deleted file mode 100644
index cf459cb2..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DestinationScalingMode.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
-{
- enum DestinationScalingMode
- {
- Freeze,
- ScaleToWindow,
- ScaleAndCrop,
- None,
- PreserveAspectRatio
- }
-} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs
deleted file mode 100644
index d46206d4..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Ryujinx.Common.Memory;
-using System.Runtime.InteropServices;
-
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService.Types
-{
- [StructLayout(LayoutKind.Sequential, Size = 0x60)]
- struct DisplayInfo
- {
- public Array64<byte> Name;
- public bool LayerLimitEnabled;
- public Array7<byte> Padding;
- public ulong LayerLimitMax;
- public ulong Width;
- public ulong Height;
- }
-} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs
deleted file mode 100644
index ac8c3e02..00000000
--- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/SourceScalingMode.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
-{
- enum SourceScalingMode
- {
- None,
- Freeze,
- ScaleToWindow,
- ScaleAndCrop,
- PreserveAspectRatio
- }
-} \ No newline at end of file