mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 16:40:41 +00:00
[Input] Do not hook FocusedChanged
This is handled by NativeWindowBase now.
This commit is contained in:
parent
8eae337d93
commit
c98b4ea178
|
@ -196,12 +196,6 @@ namespace OpenTK.Input
|
||||||
KeyUp(this, e);
|
KeyUp(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ClearKeys()
|
|
||||||
{
|
|
||||||
for (Key i = 0; i < Key.LastKey; i++)
|
|
||||||
state[i] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if false
|
#if false
|
||||||
internal void SetKey(Key key, uint scancode, KeyModifiers mods, bool pressed)
|
internal void SetKey(Key key, uint scancode, KeyModifiers mods, bool pressed)
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,14 +69,6 @@ namespace OpenTK.Platform
|
||||||
// Hook keyboard events
|
// Hook keyboard events
|
||||||
window.KeyDown += keyboard.HandleKeyDown;
|
window.KeyDown += keyboard.HandleKeyDown;
|
||||||
window.KeyUp += keyboard.HandleKeyUp;
|
window.KeyUp += keyboard.HandleKeyUp;
|
||||||
|
|
||||||
window.FocusedChanged += (sender, e) =>
|
|
||||||
{
|
|
||||||
if (!window.Focused)
|
|
||||||
{
|
|
||||||
keyboard.ClearKeys();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IInputDriver Members
|
#region IInputDriver Members
|
||||||
|
|
Loading…
Reference in a new issue