aboutsummaryrefslogtreecommitdiffstats
path: root/libgamepad_get_absolute_axis_info.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-26 16:01:13 +0200
committerMattias Andrée <maandree@kth.se>2022-07-26 16:02:05 +0200
commit9de0de4d3d32ab97226fa9868de1fa2290120429 (patch)
tree292473831841529716f97565391303fb9b071c15 /libgamepad_get_absolute_axis_info.c
parentUpdate information about Sixaxis (diff)
downloadlibgamepad-9de0de4d3d32ab97226fa9868de1fa2290120429.tar.gz
libgamepad-9de0de4d3d32ab97226fa9868de1fa2290120429.tar.bz2
libgamepad-9de0de4d3d32ab97226fa9868de1fa2290120429.tar.xz
Do not relay on libevdev for button/axis names, an prepare for device specific names, and add reverse lookup functions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamepad_get_absolute_axis_info.c')
-rw-r--r--libgamepad_get_absolute_axis_info.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgamepad_get_absolute_axis_info.c b/libgamepad_get_absolute_axis_info.c
index a6f8220..307d85a 100644
--- a/libgamepad_get_absolute_axis_info.c
+++ b/libgamepad_get_absolute_axis_info.c
@@ -2,4 +2,8 @@
#include "common.h"
-extern inline const struct input_absinfo *libgamepad_get_absolute_axis_info(struct libgamepad_device *, uint16_t);
+const struct input_absinfo *
+libgamepad_get_absolute_axis_info(struct libgamepad_device *device, uint16_t code)
+{
+ return libevdev_get_abs_info(device->dev, (unsigned int)code);
+}