* Platform/X11/X11Keyboard.cs: Added index bounds check for
GetState.
This commit is contained in:
parent
1a8f589f5c
commit
23ad81d12b
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
public KeyboardState GetState(int index)
|
||||
{
|
||||
// X11Keyboard supports a single keyboard only
|
||||
if (index < 0 || index > 1)
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
|
||||
ProcessEvents();
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue