aboutsummaryrefslogtreecommitdiffstats
path: root/test-details.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 /test-details.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 '')
-rw-r--r--test-details.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-details.c b/test-details.c
index 420e007..e834819 100644
--- a/test-details.c
+++ b/test-details.c
@@ -38,7 +38,7 @@ main(int argc, char *argv[])
assert(gamepad.buttons[i] < ELEMSOF(gamepad.button_map));
assert(gamepad.button_map[gamepad.buttons[i]] == (int16_t)i);
printf("\t%s [pressed=%i]\n",
- libgamepad_get_button_name(gamepad.buttons[i]),
+ libgamepad_get_button_name(NULL, gamepad.buttons[i]),
libgamepad_get_button_is_pressed(&gamepad, gamepad.buttons[i]));
}
n = 0;
@@ -59,10 +59,10 @@ main(int argc, char *argv[])
assert(gamepad.absolute_axis_map[gamepad.absolute_axes[i]] == (int16_t)i);
absinfo = libgamepad_get_absolute_axis_info(&gamepad, gamepad.absolute_axes[i]);
if (!absinfo) {
- printf("\t%s\n", libgamepad_get_absolute_axis_name(gamepad.absolute_axes[i]));
+ printf("\t%s\n", libgamepad_get_absolute_axis_name(NULL, gamepad.absolute_axes[i]));
} else {
printf("\t%s [value=%i, min=%i, max=%i, fuzz=%i, flat=%i, resolution=%i]\n",
- libgamepad_get_absolute_axis_name(gamepad.absolute_axes[i]),
+ libgamepad_get_absolute_axis_name(NULL, gamepad.absolute_axes[i]),
absinfo->value, absinfo->minimum, absinfo->maximum,
absinfo->fuzz, absinfo->flat, absinfo->resolution);
}
@@ -83,7 +83,7 @@ main(int argc, char *argv[])
assert(gamepad.relative_axes);
assert(gamepad.relative_axes[i] < ELEMSOF(gamepad.relative_axis_map));
assert(gamepad.relative_axis_map[gamepad.relative_axes[i]] == (int16_t)i);
- printf("\t%s\n", libgamepad_get_relative_axis_name(gamepad.relative_axes[i]));
+ printf("\t%s\n", libgamepad_get_relative_axis_name(NULL, gamepad.relative_axes[i]));
}
n = 0;
for (i = 0; i < ELEMSOF(gamepad.relative_axis_map); i++) {