[AD] ex_joystick_hotplugging.c

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


On 2010-08-21, trentg@xxxxxxxxxx <trentg@xxxxxxxxxx> wrote:
> Revision: 13614
>           http://alleg.svn.sourceforge.net/alleg/?rev=13614&view=rev
> Author:   trentg
> Date:     2010-08-21 15:37:00 +0000 (Sat, 21 Aug 2010)
> 
> Log Message:
> -----------
> Added ex_joystick_hotplugging

Hi,

I still think it's a bad idea that al_get_num_joysticks can now
invalidate existing ALLEGRO_JOYSTICK structures.

> +      else if (event.type == ALLEGRO_EVENT_JOYSTICK_CONFIGURATION) {
> +         num_joysticks = al_get_num_joysticks();
> +      }

curr_joy is invalid at this point.

It crashes when I unplug a joystick.  (I will fix it while fixing some
issues with the linux joystick driver)

Peter




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