summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-11-27 13:15:52 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-11-27 13:15:52 +0100
commit09d8936f0e640ae863861a92f6d16f8c35c93501 (patch)
tree3a2490b0e1259680b5f0b5350951f7d0982c3335 /src
parent05bc72eeb33ea42012da2eba26dcaedfafb2f3a2 (diff)
downloadzoom++-09d8936f0e640ae863861a92f6d16f8c35c93501.tar
zoom++-09d8936f0e640ae863861a92f6d16f8c35c93501.zip
Some fixes for recent changes in GCC, libX11, etc...HEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/zoom.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8718ba7..d5fefb2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,4 +14,4 @@ add_executable(zoom
TriangleRecord.h
zoom.cpp
)
-target_link_libraries(zoom ${Boost_LIBRARIES} ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY} ${GLPNG_LIBRARY} ${LIBXML2_LIBRARIES})
+target_link_libraries(zoom ${Boost_LIBRARIES} ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY} ${GLPNG_LIBRARY} ${LIBXML2_LIBRARIES} ${X11_LIBRARIES} ${X11_Xi_LIB})
diff --git a/src/zoom.cpp b/src/zoom.cpp
index 84c303c..78e5389 100644
--- a/src/zoom.cpp
+++ b/src/zoom.cpp
@@ -26,6 +26,7 @@
#else
#include <iostream>
#include <X11/X.h>
+#include <X11/XKBlib.h>
#include <X11/extensions/XInput2.h>
#include <GL/glx.h>
#include <sys/time.h>
@@ -390,7 +391,7 @@ int main() {
break;
case KeyPress:
- switch(XKeycodeToKeysym(disp, event.xkey.keycode, 0)) {
+ switch(XkbKeycodeToKeysym(disp, event.xkey.keycode, 0, 0)) {
case XK_Up: case XK_w: input |= Zoom::Game::FORWARD; break;
case XK_Down: case XK_s: input |= Zoom::Game::BACKWARD; break;
case XK_Left: case XK_a: input |= Zoom::Game::LEFT; break;
@@ -400,7 +401,7 @@ int main() {
break;
case KeyRelease:
- switch(XKeycodeToKeysym(disp, event.xkey.keycode, 0)) {
+ switch(XkbKeycodeToKeysym(disp, event.xkey.keycode, 0, 0)) {
case XK_Up: case XK_w: input &= ~Zoom::Game::FORWARD; break;
case XK_Down: case XK_s: input &= ~Zoom::Game::BACKWARD; break;
case XK_Left: case XK_a: input &= ~Zoom::Game::LEFT; break;