mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 11:35:39 +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,
|
IntPtr keysym_ptr = API.GetKeyboardMapping(window.Display, (byte)firstKeyCode,
|
||||||
lastKeyCode - firstKeyCode + 1, ref keysyms_per_keycode);
|
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);
|
API.Free(keysym_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region internal bool ProcessKeyboardEvent(API.RawInput rin)
|
#region internal bool ProcessKeyboardEvent(API.RawInput rin)
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes raw input events.
|
/// Processes X11 KeyEvents.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="rin"></param>
|
/// <param name="e">The X11.KeyEvent to process</param>
|
||||||
/// <returns></returns>
|
/// <returns>True if the event was processed, false otherwise.</returns>
|
||||||
internal bool ProcessKeyboardEvent(X11.KeyEvent e)
|
internal bool ProcessKeyboardEvent(X11.KeyEvent e)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue