[AD] EVDEV mouse driver

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Title: EVDEV mouse driver

from Annie - will still don't have internet at home...

--
Vincent Penquerc'h


Hi !

I have added support for event interface (EVDEV)
for mouse under Linux (e.g. /dev/input/mice or /dev/input/event0).

The driver should be able to support both normal mouse and
graphic tablet. I've tested it with a Wacom Graphire2 tablet
and a MS Intellimouse.

This is a big (and slow?) driver. Since tablets usually send
the position in absolute mode, i needed to change lmouse.c
to be able to manage the mouse position in my driver.
This means that there are some changes to all Linux mouse
drivers. There is also a change in behavior: when a packet was
invalid (for ps2 and gmpd, but not for ms) the buttons where
assumed to be released. Now, for all mice, if a packet is invalid,
the buttons keep the same state. (If you want the previous behavior,
i can change it)

Only movement and buttons are supported. No pressure, no tilt,
Allegro can't know which tool is used: this is a mouse driver!
(As a side note, i'm not sure pressure and tilt would be usefull
in a game library)

Problems:

. Speed and mickeys are probably not correctly handled.

. For tablet, there may be some glitches just after initialization
(the first tool may not be correctly detected)

. I don't know how to make the setup utility detect mouse of
type EVDEV. Two main problems: the device is not /dev/mouse,
but /dev/input/mouse0, /dev/input/mice or /dev/input/event0.
So we'd need to read several devices at a time ?
Second, a read on an event device returns a whole number of
'input_event' structures, and the utility tries to read
one byte at a time.

. The device file name is set in the config file, but it may
not always be the same.

I'd very much like people to test the driver with various devices.

How to apply the patch:
. Copy lmseev.diff in your Allegro directory
. cd to your Allegro directory
. Type: patch -p1 < lmseev.diff

--
Annie



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/