mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 07:35:27 +00:00
Corrected an invalid cast exception in X11Keyboard constructor.
This commit is contained in:
parent
2b7f7bbc24
commit
8f5fc9cdd8
|
@ -107,17 +107,20 @@ namespace OpenTK.Platform.X11
|
|||
IntPtr keysym_ptr = API.GetKeyboardMapping(window.Display, (byte)firstKeyCode,
|
||||
lastKeyCode - firstKeyCode + 1, ref keysyms_per_keycode);
|
||||
|
||||
keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[]));
|
||||
keysyms = new IntPtr[(lastKeyCode - firstKeyCode + 1) * keysyms_per_keycode];
|
||||
Marshal.PtrToStructure(keysym_ptr, keysyms);
|
||||
//keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[]));
|
||||
|
||||
API.Free(keysym_ptr);
|
||||
}
|
||||
|
||||
#region internal bool ProcessKeyboardEvent(API.RawInput rin)
|
||||
|
||||
/// <summary>
|
||||
/// Processes raw input events.
|
||||
/// Processes X11 KeyEvents.
|
||||
/// </summary>
|
||||
/// <param name="rin"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="e">The X11.KeyEvent to process</param>
|
||||
/// <returns>True if the event was processed, false otherwise.</returns>
|
||||
internal bool ProcessKeyboardEvent(X11.KeyEvent e)
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue