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>
This commit is contained in:
Peter Hutterer 2013-09-18 16:04:44 +10:00
parent 7d3d4ae55d
commit 160c2db32d

View File

@ -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 */