Skip to content
Permalink
Browse files

Wait for devices to finish initializing when inserted, before using t…

…hem. Fixes hotplug issue with XBox 360 game controller.
  • Loading branch information
slouken committed May 25, 2015
1 parent b0c5e20 commit 507157abdbbc1c133eac9b02f5958563517621a3
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/linux/SDL_udev.c
@@ -469,6 +469,9 @@ SDL_UDEV_Poll(void)
action = _this->udev_device_get_action(dev);

if (SDL_strcmp(action, "add") == 0) {
/* Wait for the device to finish initialization */
SDL_Delay(100);

device_event(SDL_UDEV_DEVICEADDED, dev);
} else if (SDL_strcmp(action, "remove") == 0) {
device_event(SDL_UDEV_DEVICEREMOVED, dev);

0 comments on commit 507157a

Please sign in to comment.