diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index e142838c..ed54eb98 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -41,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Applets var keyboardConfig = _normalSession.Pop(); var transferMemory = _normalSession.Pop(); - _keyboardConfig = ReadStruct<SoftwareKeyboardConfig>(keyboardConfig); + _keyboardConfig = IApplet.ReadStruct<SoftwareKeyboardConfig>(keyboardConfig); if (_keyboardConfig.UseUtf8) { @@ -176,20 +176,5 @@ namespace Ryujinx.HLE.HOS.Applets return stream.ToArray(); } } - - private static T ReadStruct<T>(byte[] data) - where T : struct - { - GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned); - - try - { - return Marshal.PtrToStructure<T>(handle.AddrOfPinnedObject()); - } - finally - { - handle.Free(); - } - } } } |
