From 11b437eafc59f81e767c6389c16dcbb5c7e82f11 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 5 Oct 2021 12:38:44 -0300 Subject: [PATCH] Fix DisplayInfo struct (#2708) --- .../ApplicationDisplayService/Types/DisplayInfo.cs | 2 +- .../Services/Vi/RootService/IApplicationDisplayService.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs index 06309da0bb..d46206d4a0 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/Types/DisplayInfo.cs @@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService.Type [StructLayout(LayoutKind.Sequential, Size = 0x60)] struct DisplayInfo { - public Array40 Name; + public Array64 Name; public bool LayerLimitEnabled; public Array7 Padding; public ulong LayerLimitMax; diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs index 3008bf2c81..9272fd80b1 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs @@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService { DisplayInfo displayInfo = new DisplayInfo() { - Name = new Array40(), + Name = new Array64(), LayerLimitEnabled = layerLimitEnabled, Padding = new Array7(), LayerLimitMax = layerLimitMax, @@ -123,8 +123,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService for (int i = 0; i < (int)displayCount; i++) { - context.Memory.Fill(displayInfoBuffer + (ulong)(i * Unsafe.SizeOf()), (ulong)(Unsafe.SizeOf()), 0x00); - context.Memory.Write(displayInfoBuffer, _displayInfo[i]); + context.Memory.Write(displayInfoBuffer + (ulong)(i * Unsafe.SizeOf()), _displayInfo[i]); } context.ResponseData.Write(displayCount);