mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-18 23:37:30 +00:00
* Platform/X11/X11Keyboard.cs: Added index bounds check for
GetState.
This commit is contained in:
parent
7947cad6f8
commit
e638652d01
|
@ -75,6 +75,10 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
public KeyboardState GetState(int index)
|
public KeyboardState GetState(int index)
|
||||||
{
|
{
|
||||||
|
// X11Keyboard supports a single keyboard only
|
||||||
|
if (index < 0 || index > 1)
|
||||||
|
throw new ArgumentOutOfRangeException("index");
|
||||||
|
|
||||||
ProcessEvents();
|
ProcessEvents();
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue