Re: [AD] mouse movement

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


Evert Glebbeek wrote:

An alternative, which may be quite neat if we can implement this properly, is to be able to register the
> mouse as a "generic input device" rather than a mouse. The rationale being that if you're using the mouse > to control a camera (to stick with that example), then you're really using it as a generic input device
> more than a mouse.

I've been thinking some more about all this and I've concluded that this is the best thing to do.

A flag ALLEGRO_MOUSE_GENERIC_INPUT could be passed to al_install_mouse(), as opposed to ALLEGRO_MOUSE_POINTER_INPUT which would be default. This way the user could select the desired behavior - getting mouse pointer events or getting raw input data from the device. Not all platforms have to support ALLEGRO_MOUSE_GENERIC_INPUT and al_install_mouse() could fail there. It is implementable on Windows and X11 (using XInput2 I think).

All this will wait for A5.1 or whatever it will be called. For now I'll just make the full-screen mode in Windows use conventional (pointer) mouse input, to keep it compatible with other platforms.


--
Milan Mimica
http://sparklet.sf.net




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