On Tue, 26 Jun 2001, Stefan Seefeld wrote:
> Is this a deliberate choice, or would it be equally possible to make a
> synchronous call ?
I think it is deliberate -- consider when a USB device is plugged into
the live USB wire.
> Any hints would be highly appreciated.
The hint is hidden in the header:
/* This event is sent/received to require/get the capabilities of a device
* as specified in target/origin.
* An event stating num_buttons=num_axes=0 says, that the device is inactive,
* unplugged, whatever. Devices automatically report (detectable) state
* changes via devinfo. But you need to re-query the valinfo records.
*/
In other words, just send the query and then treat device insertion/removal
as just another event; have a handler decide when to load/unload any
LibGII filters e.g. keyboard emulation of mouse pointers based on these
events when they are received.
--
Brian