aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs
diff options
context:
space:
mode:
authorCaian Benedicto <caianbene@gmail.com>2021-02-10 21:28:44 -0300
committerGitHub <noreply@github.com>2021-02-11 01:28:44 +0100
commitf16d7f91f1e0483a55c23382171bb81a679e4d8c (patch)
treeb3c05d649c3cb2451a958931d26c4748a77dc1fa /Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs
parente28a924501b7b94c8b5f42af5b5d44b47e6b82df (diff)
Improve inline keyboard compatibility (#1959)
* 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
Diffstat (limited to 'Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs')
-rw-r--r--Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs79
1 files changed, 71 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs
index 6213c2e4..a80690c3 100644
--- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs
+++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardCalc.cs
@@ -3,7 +3,7 @@
namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
{
/// <summary>
- /// A structure that defines the configuration options of the software keyboard.
+ /// A structure with configuration options of the software keyboard when starting a new input request in inline mode.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack=1, CharSet = CharSet.Unicode)]
struct SoftwareKeyboardCalc
@@ -12,28 +12,56 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
public uint Unknown;
+ /// <summary>
+ /// The size of the Calc struct, as reported by the process communicating with the applet.
+ /// </summary>
public ushort Size;
public byte Unknown1;
public byte Unknown2;
+ /// <summary>
+ /// Configuration flags. Their purpose is currently unknown.
+ /// </summary>
public ulong Flags;
+ /// <summary>
+ /// The original parameters used when initializing the keyboard applet.
+ /// </summary>
public SoftwareKeyboardInitialize Initialize;
+ /// <summary>
+ /// The audio volume used by the sound effects of the keyboard.
+ /// </summary>
public float Volume;
+ /// <summary>
+ /// The initial position of the text cursor (caret) in the provided input text.
+ /// </summary>
public int CursorPos;
+ /// <summary>
+ /// Appearance configurations for the on-screen keyboard.
+ /// </summary>
public SoftwareKeyboardAppear Appear;
+ /// <summary>
+ /// The initial input text to be used by the software keyboard.
+ /// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = InputTextLength + 1)]
public string InputText;
- public byte Utf8Mode;
+ /// <summary>
+ /// When set, the strings communicated by software keyboard will be encoded as UTF-8 instead of UTF-16.
+ /// </summary>
+ [MarshalAs(UnmanagedType.I1)]
+ public bool UseUtf8;
public byte Unknown3;
+ /// <summary>
+ /// [5.0.0+] Enable the backspace key in the software keyboard.
+ /// </summary>
[MarshalAs(UnmanagedType.I1)]
public bool BackspaceEnabled;
@@ -41,32 +69,57 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
public byte Unknown5;
[MarshalAs(UnmanagedType.I1)]
- public byte KeytopAsFloating;
+ public bool KeytopAsFloating;
[MarshalAs(UnmanagedType.I1)]
- public byte FooterScalable;
+ public bool FooterScalable;
[MarshalAs(UnmanagedType.I1)]
- public byte AlphaEnabledInInputMode;
+ public bool AlphaEnabledInInputMode;
- [MarshalAs(UnmanagedType.I1)]
public byte InputModeFadeType;
+ /// <summary>
+ /// When set, the software keyboard ignores touch input.
+ /// </summary>
[MarshalAs(UnmanagedType.I1)]
- public byte TouchDisabled;
+ public bool TouchDisabled;
+ /// <summary>
+ /// When set, the software keyboard ignores hardware keyboard commands.
+ /// </summary>
[MarshalAs(UnmanagedType.I1)]
- public byte HardwareKeyboardDisabled;
+ public bool HardwareKeyboardDisabled;
public uint Unknown6;
public uint Unknown7;
+ /// <summary>
+ /// Default value is 1.0.
+ /// </summary>
public float KeytopScale0;
+
+ /// <summary>
+ /// Default value is 1.0.
+ /// </summary>
public float KeytopScale1;
+
public float KeytopTranslate0;
public float KeytopTranslate1;
+
+ /// <summary>
+ /// Default value is 1.0.
+ /// </summary>
public float KeytopBgAlpha;
+
+ /// <summary>
+ /// Default value is 1.0.
+ /// </summary>
public float FooterBgAlpha;
+
+ /// <summary>
+ /// Default value is 1.0.
+ /// </summary>
public float BalloonScale;
public float Unknown8;
@@ -74,9 +127,19 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
public uint Unknown10;
public uint Unknown11;
+ /// <summary>
+ /// [5.0.0+] Enable sound effect.
+ /// </summary>
public byte SeGroup;
+ /// <summary>
+ /// [6.0.0+] Enables the Trigger field when Trigger is non-zero.
+ /// </summary>
public byte TriggerFlag;
+
+ /// <summary>
+ /// [6.0.0+] Always set to zero.
+ /// </summary>
public byte Trigger;
public byte Padding;