Re: [AD] Hotplug joysticks |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming libraryAllegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Hotplug joysticks
- From: Trent Gamblin <trent@xxxxxxxxxx>
- Date: Wed, 18 Aug 2010 19:17:14 -0600
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?