[PATCH] dmx: provide enough space for axis mappings
Peter Hutterer
peter.hutterer at who-t.net
Thu Sep 19 01:26:00 PDT 2013
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 at who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
hw/dmx/input/usb-private.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/dmx/input/usb-private.h b/hw/dmx/input/usb-private.h
index 096607a..2ecfdf6 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 */
--
1.8.3.1
More information about the xorg-devel
mailing list