Re: [AD] 4.3 Events and polling

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


On 8/9/06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
Not in the current implementation.  The API does not prevent it though,
but I would seriously reconsider whether polluting the implementation is
worth it.
I suppose there would need to be a vtable in the event source object,
but wouldn't there need to be one anyway to handle custom clean-up?

> This would be
> useful for a polling driver where it wouldn't make sense to get the
> value any more frequently than the game's main loop (I'm thinking of
> the joystick)

This should not be necessary with modern OSes & joysticks.  Really the
gameport should be dropped.
What do you mean by the gameport - do you mean the old DOS interface
(port 201 or something was it?)
Anyway, on OS X it's done via the USB HID manager, and the
recommendation is to poll for the joystick position, although it is
possible to set up an event queue for button presses. DirectInput (I
looked at the 8.1 docs) says basically the same thing. (ie
IDirectInputDevice8::Poll )

Pete




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