diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs index 0b5705b934..039cc81f40 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs @@ -52,7 +52,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi public long GetSystemDisplayService(ServiceCtx context) { - MakeObject(context, new ISystemDisplayService()); + MakeObject(context, new ISystemDisplayService(this)); return 0; } diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs index 5266a2536a..81968d9739 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs @@ -10,13 +10,14 @@ namespace Ryujinx.HLE.HOS.Services.Vi public override IReadOnlyDictionary Commands => _commands; - public ISystemDisplayService() + public ISystemDisplayService(IApplicationDisplayService applicationDisplayService) { _commands = new Dictionary { - { 2205, SetLayerZ }, - { 2207, SetLayerVisibility }, - { 3200, GetDisplayMode } + { 2205, SetLayerZ }, + { 2207, SetLayerVisibility }, + { 2312, applicationDisplayService.CreateStrayLayer }, + { 3200, GetDisplayMode } }; } diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs index cce1b2b90e..0eab5e31c7 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs @@ -169,20 +169,23 @@ namespace Ryujinx.HLE.HOS.Services.Android //TODO: Errors. int slot = parcelReader.ReadInt32(); - int unknown4 = parcelReader.ReadInt32(); - int unknown8 = parcelReader.ReadInt32(); - int unknownC = parcelReader.ReadInt32(); - int timestamp = parcelReader.ReadInt32(); - int isAutoTimestamp = parcelReader.ReadInt32(); + + int flatternedObjSize = parcelReader.ReadInt32(); + int fdCount = parcelReader.ReadInt32(); + + long timestamp = parcelReader.ReadInt64(); + int isAutoTimestamp = parcelReader.ReadInt32(); + int cropTop = parcelReader.ReadInt32(); int cropLeft = parcelReader.ReadInt32(); int cropRight = parcelReader.ReadInt32(); int cropBottom = parcelReader.ReadInt32(); + int scalingMode = parcelReader.ReadInt32(); int transform = parcelReader.ReadInt32(); int stickyTransform = parcelReader.ReadInt32(); int unknown34 = parcelReader.ReadInt32(); - int unknown38 = parcelReader.ReadInt32(); + int swapInterval = parcelReader.ReadInt32(); int isFenceValid = parcelReader.ReadInt32(); int fence0Id = parcelReader.ReadInt32(); int fence0Value = parcelReader.ReadInt32(); @@ -244,9 +247,9 @@ namespace Ryujinx.HLE.HOS.Services.Android { int slot = parcelReader.ReadInt32(); - int bufferCount = parcelReader.ReadInt32(); + bool hasInput = parcelReader.ReadInt32() == 1; - if (bufferCount > 0) + if (hasInput) { long bufferSize = parcelReader.ReadInt64(); @@ -290,6 +293,11 @@ namespace Ryujinx.HLE.HOS.Services.Android int fbHeight = _bufferQueue[slot].Data.Height; int nvMapHandle = BitConverter.ToInt32(_bufferQueue[slot].Data.RawData, 0x4c); + if (nvMapHandle == 0) + { + nvMapHandle = BitConverter.ToInt32(_bufferQueue[slot].Data.RawData, 0x4); + } + int bufferOffset = BitConverter.ToInt32(_bufferQueue[slot].Data.RawData, 0x50); NvMapHandle map = NvMapIoctl.GetNvMap(context, nvMapHandle);