Re: [AD] Hotplug joysticks

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


On 2010-08-18, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On 2010-08-18, at 7:01 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > Another good thing is that this would support platforms without hotplug
> > notifications.  You could call al_reinstall_joystick() when the user
> > enters the "Controls" section of your game's menu, which could be more
> > efficient than al_uninstall_joystick + al_install_joystick.
> 
> That's actually how I implemented it on Windows anyway. Is there a
> hotplug notification I missed in the reference? It doesn't seem too
> ineffiecient to enumerate the pads once a second in any case, but
> perhaps there could be an option. Maybe a flag to al_install_joystick?

I just assumed there was something on Windows :)  Well, I found
references to connect/disconnect events for the XInput API but not
DirectInput.

Peter




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