mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[input] Get single axis info for unbound devices
This doesn't fix the problem of keyhelp not working for axes belonging to unbound devices, but may be a step in the right direction.
This commit is contained in:
parent
2e3e9ea7c0
commit
7571231100
1 changed files with 3 additions and 7 deletions
|
@ -298,13 +298,9 @@ in_keyhelp_event_handler (const IE_event_t *ie_event, void *unused)
|
||||||
if (db) {
|
if (db) {
|
||||||
ai = &db->axis_info[axis];
|
ai = &db->axis_info[axis];
|
||||||
} else {
|
} else {
|
||||||
//FIXME set single axis info entry
|
in_axisinfo_t axis_info;
|
||||||
int num_axes;
|
IN_GetAxisInfo (devid, axis, &axis_info);
|
||||||
in_axisinfo_t *axis_info;
|
ai = &axis_info;
|
||||||
IN_AxisInfo (devid, 0, &num_axes);
|
|
||||||
axis_info = alloca (num_axes * sizeof (in_axisinfo_t));
|
|
||||||
IN_AxisInfo (devid, axis_info, &num_axes);
|
|
||||||
ai = &axis_info[axis];
|
|
||||||
}
|
}
|
||||||
if (!ai->min && !ai->max) {
|
if (!ai->min && !ai->max) {
|
||||||
if (abs (value) > keyhelp_axis_threshold) {
|
if (abs (value) > keyhelp_axis_threshold) {
|
||||||
|
|
Loading…
Reference in a new issue