diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-09-18 16:04:44 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-09-25 03:52:54 +1000 |
commit | 160c2db32d0b9ee5316a44179a6af4f4722e3d0a (patch) | |
tree | 8a6a19569a0675213711a283f51002a6c9c3deaf /hw | |
parent | 7d3d4ae55dd6ee338439e2424ac423b1df80501b (diff) |
dmx: provide enough space for axis mappings
relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to
axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit
set in the ABS_* range is axis 2, and so on. This requires us to actually have
enough space to have all the ABS_*/REL_* range.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/dmx/input/usb-private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/dmx/input/usb-private.h b/hw/dmx/input/usb-private.h index 096607a34..2ecfdf636 100644 --- a/hw/dmx/input/usb-private.h +++ b/hw/dmx/input/usb-private.h @@ -102,8 +102,8 @@ typedef struct _myPrivate { int fd; /**< File descriptor */ unsigned char mask[EV_MAX / 8 + 1]; /**< Mask */ int numRel, numAbs, numLeds; /**< Counts */ - int relmap[DMX_MAX_AXES]; /**< Relative axis map */ - int absmap[DMX_MAX_AXES]; /**< Absolute axis map */ + int relmap[REL_CNT]; /**< Relative axis map */ + int absmap[ABS_CNT]; /**< Absolute axis map */ CARD32 kbdState[NUM_STATE_ENTRIES]; /**< Keyboard state */ DeviceIntPtr pKeyboard; /** Keyboard device */ |