Re: [AD] Linux mouse patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
tjaden@xxxxxxxxxx writes:
> I added a couple of allegro.cfg options (applicable only to Linux):
Great stuff, thanks!
> 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.
Urgh, that's a pain. It sounds like the wheel would be better described as a
third axis, rather than a button, since it doesn't have a clear on/off
state. Adding a mouse_z axis would involve changing quite a lot of files,
but it would mostly just be a matter of searching for mouse_x/mouse_y, and
adding a third entry wherever they are referenced.
Alternatively we could have poll_mouse() clear the bit, so it would be a
sticky thing like how reading mouse mickeys behaves. But that has the risk
of losing input if the wheel is turned more than one notch in between two
polling calls, and would require user programs to only ever read the mouse
in polling mode if they want to access the wheel, so I don't think it is
such a great idea.
Does anyone know how other input systems have described the wheel? In the
win32 API it just sends click messages, which doesn't apply since the
Allegro input model isn't message based, but it would be interesting to know
how it looks to DirectInput, X, etc...
--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."