[AD] Linux mouse patch

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


Hi all,

I added a couple of allegro.cfg options (applicable only to Linux):

1. mouse_device = /dev/whatever

This way I can choose whether to use my serial mouse, my touch pad, or
my PS/2 mouse without relinking /dev/mouse.  Each mouse driver has
code in the `mouse_init' function to check for this config variable,
but now I'm thinking that this should be checked another level up.

Another thing: perhaps the `gpmdata' driver should be changed to the
`Mouse Systems' driver, since the device filename can now be
specified.

2. intellimouse = yes

I added support for Intellimouse extensions to the MS and LPS2
protocols which provides mouse wheel support (extra bits in mouse_b).
It also provides middle mouse button support to the MS protocol.

But a little problem came up.  The mouse wheel only generates data
when the wheel moves, not when it stops moving.  Therefore there is no
way to unset the bit, unless the mouse is moved or one of the buttons
is pushed.  If you have a wheel mouse, try scrolling the wheel but
doing nothing else and you will see what I mean.  The question is, how
do I work around this?

I have attached a diff for those interested.  Unfortunately I forgot
to check which version of Allegro I was hacking on (3.9.25), but it
should still work with 3.9.26.

Peter
-- 
tjaden@xxxxxxxxxx - http://www.alphalink.com.au/~tjaden/
"What's in the box?"  "Pain."

Attachment: mousework.diff.gz
Description: Binary data



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