0
0
Fork 0

Fix DisplayInfo struct (#2708)

This commit is contained in:
gdkchan 2021-10-05 12:38:44 -03:00 committed by GitHub
parent fff48bb45a
commit 11b437eafc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService.Type
[StructLayout(LayoutKind.Sequential, Size = 0x60)] [StructLayout(LayoutKind.Sequential, Size = 0x60)]
struct DisplayInfo struct DisplayInfo
{ {
public Array40<byte> Name; public Array64<byte> Name;
public bool LayerLimitEnabled; public bool LayerLimitEnabled;
public Array7<byte> Padding; public Array7<byte> Padding;
public ulong LayerLimitMax; public ulong LayerLimitMax;

View file

@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
{ {
DisplayInfo displayInfo = new DisplayInfo() DisplayInfo displayInfo = new DisplayInfo()
{ {
Name = new Array40<byte>(), Name = new Array64<byte>(),
LayerLimitEnabled = layerLimitEnabled, LayerLimitEnabled = layerLimitEnabled,
Padding = new Array7<byte>(), Padding = new Array7<byte>(),
LayerLimitMax = layerLimitMax, LayerLimitMax = layerLimitMax,
@ -123,8 +123,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
for (int i = 0; i < (int)displayCount; i++) for (int i = 0; i < (int)displayCount; i++)
{ {
context.Memory.Fill(displayInfoBuffer + (ulong)(i * Unsafe.SizeOf<DisplayInfo>()), (ulong)(Unsafe.SizeOf<DisplayInfo>()), 0x00); context.Memory.Write(displayInfoBuffer + (ulong)(i * Unsafe.SizeOf<DisplayInfo>()), _displayInfo[i]);
context.Memory.Write(displayInfoBuffer, _displayInfo[i]);
} }
context.ResponseData.Write(displayCount); context.ResponseData.Write(displayCount);