mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 06:25:32 +00:00
Slightly changed debug output on Create event (X11GLNative)
Corrected event hooking in X11Input.
This commit is contained in:
parent
6ccbfb266e
commit
4c0b710fa6
|
@ -283,8 +283,8 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
if (this.Create != null)
|
||||
{
|
||||
Debug.Print("Create event fired from window: {0}", info.ToString());
|
||||
this.Create(this, e);
|
||||
Debug.Print("OnCreate fired, from window: {0}", info.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
Event e = new Event();
|
||||
KeyEvent keyEvent = new KeyEvent();
|
||||
int pending;
|
||||
|
||||
|
||||
#region --- Constructors ---
|
||||
|
@ -115,16 +116,31 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Consumes to keyboard, mouse, etc events, routing them to their
|
||||
/// respective drivers.
|
||||
/// </summary>
|
||||
public void ProcessEvents()
|
||||
{
|
||||
pending = API.Pending(window.Display);
|
||||
|
||||
if (pending == 0)
|
||||
return;
|
||||
|
||||
API.PeekEvent(window.Display, e);
|
||||
|
||||
switch (e.Type)
|
||||
{
|
||||
case EventType.KeyPress:
|
||||
case EventType.KeyRelease:
|
||||
Debug.WriteLine("Key event consumed");
|
||||
API.NextEvent(window.Display, keyEvent);
|
||||
keyboardDriver.ProcessKeyboardEvent(keyEvent);
|
||||
break;
|
||||
|
||||
default:
|
||||
API.NextEvent(window.Display, e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue