From f16d7f91f1e0483a55c23382171bb81a679e4d8c Mon Sep 17 00:00:00 2001 From: Caian Benedicto Date: Wed, 10 Feb 2021 21:28:44 -0300 Subject: Improve inline keyboard compatibility (#1959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve compatibility of the inline keyboard with some games * Send an empty first text to avoid crashing some games * Implement SetCustomizedDictionaries and fix SetCustomizeDic * Expand Bg and Fg –abbreviations in the swkbd applet * Fix variable names and add comments to software keyboard --- .../SoftwareKeyboard/SoftwareKeyboardDictSet.cs | 29 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs') diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs index 1abdc15b..b4ffdb90 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardDictSet.cs @@ -2,10 +2,33 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard { - [StructLayout(LayoutKind.Sequential, Pack = 4)] + /// + /// A structure with custom dictionary words for the software keyboard. + /// + [StructLayout(LayoutKind.Sequential, Pack = 2)] struct SoftwareKeyboardDictSet { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] - public uint[] Entries; + /// + /// A 0x1000-byte aligned buffer position. + /// + public ulong BufferPosition; + + /// + /// A 0x1000-byte aligned buffer size. + /// + public uint BufferSize; + + /// + /// Array of word entries in the buffer. + /// + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] + public ulong[] Entries; + + /// + /// Number of used entries in the Entries field. + /// + public ushort TotalEntries; + + public ushort Padding1; } } -- cgit v1.2.3