Do things a little closer to the way SDL does them (but not much), magical hack that fixes performance issues for X11 on some (all?) systems, use variables instead of functions for Dpy and Win in X11Helper, a couple formatting tweaks.
This commit is contained in:
@@ -126,9 +126,12 @@ void InputHandler_X11::Update(float fDeltaTime)
|
||||
Display *display = X11Helper::Dpy();
|
||||
Window window = X11Helper::Win();
|
||||
XEvent event;
|
||||
if (window)
|
||||
while(XCheckTypedWindowEvent(display, window, KeyPress, &event)
|
||||
|| XCheckTypedWindowEvent(display, window, KeyRelease, &event) )
|
||||
|
||||
if (X11Helper::Win)
|
||||
while(XCheckTypedWindowEvent(X11Helper::Dpy,
|
||||
X11Helper::Win, KeyPress, &event)
|
||||
|| XCheckTypedWindowEvent(X11Helper::Dpy,
|
||||
X11Helper::Win, KeyRelease, &event) )
|
||||
{
|
||||
LOG->Trace("key: sym %i, key %i, state %i",
|
||||
XLookupKeysym(&event.xkey,0), XSymToKeySym(XLookupKeysym(&event.xkey,0)),
|
||||
|
||||
Reference in New Issue
Block a user