From 83d4da7bffa9118012a690ac99015a06c17b9133 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 15 Jun 2009 15:03:57 +0200 Subject: EV_CNT and ABS_CNT aren't available everywhere, use *_MAX + 1 instead --- src/gui/kernel/qapplication_x11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 228b61b..4ab99a8 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -6036,7 +6036,7 @@ static int openRX71Device(const QByteArray &deviceName) } // fetch the event type mask and check that the device reports absolute coordinates - QBitArray eventTypeMask(EV_CNT, false); + QBitArray eventTypeMask(EV_MAX + 1, false); if (ioctl(fd, EVIOCGBIT(0, eventTypeMask.size()), eventTypeMask.data_ptr()->data) < 0) { close(fd); return -1; @@ -6047,7 +6047,7 @@ static int openRX71Device(const QByteArray &deviceName) } // make sure that we can get the absolute X and Y positions from the device - QBitArray absMask(ABS_CNT, false); + QBitArray absMask(ABS_MAX + 1, false); if (ioctl(fd, EVIOCGBIT(EV_ABS, absMask.size()), absMask.data_ptr()->data) < 0) { close(fd); return -1; -- cgit v0.12