From 574a07ae9c69baad7241086399ac5d4ffa356663 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 May 2010 14:46:13 +0200 Subject: [PATCH] Changed: #942 Make all keys used for actions/macros identical on all platforms --- code/nel/src/3d/driver/opengl/unix_event_emitter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp index 6b37db07e..1bdb3c8ce 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp @@ -304,9 +304,9 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server) int c; c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL); - TKey key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 0)); + TKey key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 0)); if(key == KeyNOKEY) - key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 1)); + key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 1)); server.postEvent (new CEventKeyDown (key, getKeyButton(event.xbutton.state), _PreviousKey != key, this)); _PreviousKey = key; @@ -332,9 +332,9 @@ void CUnixEventEmitter::processMessage (XEvent &event, CEventServer &server) int c; c = XLookupString(&event.xkey, Text, 1024-1, &k, NULL); - TKey key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 0)); + TKey key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 0)); if(key == KeyNOKEY) - key = getKey(XKeycodeToKeysym(_dpy, ((XKeyEvent*)&event)->keycode, 1)); + key = getKey(XKeycodeToKeysym(_dpy, event.xkey.keycode, 1)); server.postEvent (new CEventKeyUp (key, getKeyButton(event.xbutton.state), this)); _PreviousKey = KeyNOKEY;