mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-09 12:45:28 +00:00
Corrected an error, where keysyms were not allocated, causing an NRE.
This commit is contained in:
parent
25f82c8b84
commit
2b7f7bbc24
|
@ -107,7 +107,7 @@ 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);
|
||||||
|
|
||||||
Marshal.PtrToStructure(keysym_ptr, keysyms);
|
keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[]));
|
||||||
API.Free(keysym_ptr);
|
API.Free(keysym_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue