Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ynsta/steamcontroller.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Bennett <jbennett@incomsystems.biz>2015-11-12 10:28:50 +0300
committerJonathan Bennett <jbennett@incomsystems.biz>2015-11-12 10:34:33 +0300
commit39c65312e527fcd418f630e0d5ed62a0e506bb1b (patch)
tree9ddc1d06df22e1b149cefcbc94996472d399367b /src
parentb24852963a86cc08c643ce6b30778db1c6611711 (diff)
Use proper header file for nower kernel versions
Diffstat (limited to 'src')
-rw-r--r--src/uinput.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/uinput.py b/src/uinput.py
index 08bc83e..14185b4 100644
--- a/src/uinput.py
+++ b/src/uinput.py
@@ -33,7 +33,10 @@ from steamcontroller.cheader import defines
from distutils.sysconfig import get_config_var
# Get All defines from linux headers
-_def = defines('/usr/include', 'linux/uinput.h')
+if os.path.exists('/usr/include/linux/input-event-codes.h'):
+ _def = defines('/usr/include', 'linux/input-event-codes.h')
+else:
+ _def = defines('/usr/include', 'linux/uinput.h')
# Keys enum contains all keys and button from linux/uinput.h (KEY_* BTN_*)
Keys = IntEnum('Keys', {i: _def[i] for i in _def.keys() if (i.startswith('KEY_') or