support gamepad hotplug

This commit is contained in:
Sebastian Krzyszkowiak 2019-07-23 03:55:20 +02:00
parent 4cc19c3382
commit 943c4fb77b
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -100,6 +100,9 @@ static inline bool HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
#endif
}
break;
case ALLEGRO_EVENT_JOYSTICK_CONFIGURATION:
al_reconfigure_joysticks();
break;
case ALLEGRO_EVENT_JOYSTICK_AXIS:
#ifdef ALLEGRO_WITH_XWINDOWS
// XBox pads on GNU/Linux have messed up stick/axis ordering