Compare commits

...

3 Commits

Author SHA1 Message Date
Peter Hutterer
5152d616ca evdev 2.0.3 2008-08-01 17:29:24 +09:30
Michel Dänzer
2e9a71df5f xf86-input-evdev: Fix EVIOCGBIT ioctl usage on big endian platforms.
With this fix, on my PowerBook HAL hotplugging correctly detects my USB mouse,
and no longer thinks keyboards have random numbers of mouse buttons. :)

The LONG_BITS and NBITS macro definitions are stolen from xf86-input-synaptics.

Signed-off-by: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
[cherry-picked from master and fixed the trivial conflict -- jcristau]
2008-07-30 10:45:31 +02:00
Julien Cristau
49de32e70f Fill up the version info
Report correct versions instead of
"compiled for 0.0.0, module version = 1.0.0"
(cherry picked from commit 2b7edaa4ab)
2008-07-20 11:45:30 +02:00
2 changed files with 10 additions and 7 deletions

View File

@@ -22,7 +22,7 @@
AC_PREREQ(2.57) AC_PREREQ(2.57)
AC_INIT([xf86-input-evdev], AC_INIT([xf86-input-evdev],
2.0.2, 2.0.3,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-evdev) xf86-input-evdev)

View File

@@ -42,6 +42,7 @@
#include <xf86Xinput.h> #include <xf86Xinput.h>
#include <exevents.h> #include <exevents.h>
#include <mipointer.h> #include <mipointer.h>
#include <xorgVersion.h>
#include "evdev.h" #include "evdev.h"
@@ -305,7 +306,9 @@ EvdevReadInput(InputInfoPtr pInfo)
} }
} }
#define TestBit(bit, array) (array[(bit) / 8] & (1 << ((bit) % 8))) #define LONG_BITS (sizeof(long) * 8)
#define NBITS(x) (((x) + LONG_BITS - 1) / LONG_BITS)
#define TestBit(bit, array) (array[(bit) / LONG_BITS]) & (1 << ((bit) % LONG_BITS))
static void static void
EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl) EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)
@@ -894,9 +897,9 @@ EvdevConvert(InputInfoPtr pInfo, int first, int num, int v0, int v1, int v2,
static int static int
EvdevProbe(InputInfoPtr pInfo) EvdevProbe(InputInfoPtr pInfo)
{ {
char key_bitmask[(KEY_MAX + 7) / 8]; long key_bitmask[NBITS(KEY_MAX)];
char rel_bitmask[(REL_MAX + 7) / 8]; long rel_bitmask[NBITS(REL_MAX)];
char abs_bitmask[(ABS_MAX + 7) / 8]; long abs_bitmask[NBITS(ABS_MAX)];
int i, has_axes, has_buttons, has_keys; int i, has_axes, has_buttons, has_keys;
EvdevPtr pEvdev = pInfo->private; EvdevPtr pEvdev = pInfo->private;
@@ -1101,8 +1104,8 @@ static XF86ModuleVersionInfo EvdevVersionRec =
MODULEVENDORSTRING, MODULEVENDORSTRING,
MODINFOSTRING1, MODINFOSTRING1,
MODINFOSTRING2, MODINFOSTRING2,
0, /* Missing from SDK: XORG_VERSION_CURRENT, */ XORG_VERSION_CURRENT,
1, 0, 0, PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
ABI_CLASS_XINPUT, ABI_CLASS_XINPUT,
ABI_XINPUT_VERSION, ABI_XINPUT_VERSION,
MOD_CLASS_XINPUT, MOD_CLASS_XINPUT,