mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-08-04 06:11:14 +00:00
* Platform/X11/X11Keyboard.cs: Added index bounds check for
GetState.
This commit is contained in:
parent
1a8f589f5c
commit
23ad81d12b
|
@ -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