diff options
author | jduncanator <1518948+jduncanator@users.noreply.github.com> | 2019-11-18 22:16:26 +1100 |
---|---|---|
committer | Ac_K <Acoustik666@gmail.com> | 2019-11-18 12:16:26 +0100 |
commit | ee81ab547ee35c4f5f3342a6f1e0d6bbc60500e8 (patch) | |
tree | 76c623089ea56e2b27bcb06608434117086fb371 /Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs | |
parent | 79abc6ed9375116a08eda6f8e722df56d029c373 (diff) |
Initial swkbd implementation (#826)
* am: Initial swkbd implementation
Currently only implements the full screen keyboard, inline keyboard will come later.
* Remove unnecessary logging
* Miscellaneous tidy up
* am: Always pop incoming interactive session data
* am: Add a reminder to implement the full config struct
* am: Check for a max length of zero
We should only limit/truncate text when the max length is set to a non-zero value.
* Add documentation
* am: Return IStorage not available when queue is empty
We should be returning the appropriate error code when the FIFO is empty, rather than just throwing an exception and killing the emulator.
* Fix typo
* Code style changes
Diffstat (limited to 'Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs new file mode 100644 index 00000000..183da774 --- /dev/null +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardConfig.cs @@ -0,0 +1,33 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard +{ + // TODO(jduncanator): Define all fields + [StructLayout(LayoutKind.Explicit)] + struct SoftwareKeyboardConfig + { + /// <summary> + /// Type of keyboard. + /// </summary> + [FieldOffset(0x0)] + public SoftwareKeyboardType Type; + + /// <summary> + /// When non-zero, specifies the max string length. When the input is too long, swkbd will stop accepting more input until text is deleted via the B button (Backspace). + /// </summary> + [FieldOffset(0x3AC)] + public uint StringLengthMax; + + /// <summary> + /// When non-zero, specifies the max string length. When the input is too long, swkbd will display an icon and disable the ok-button. + /// </summary> + [FieldOffset(0x3B0)] + public uint StringLengthMaxExtended; + + /// <summary> + /// When set, the application will validate the entered text whilst the swkbd is still on screen. + /// </summary> + [FieldOffset(0x3D0), MarshalAs(UnmanagedType.I1)] + public bool CheckText; + } +} |