Skip to content

Commit

Permalink
haptic: Fix initial detection of haptic devices on Linux system
Browse files Browse the repository at this point in the history
SDL_UDEV_Scan must be called during SDL_SYS_HapticInit to ensure devices
outside of the 0-31 range are added to the list of haptic devices.

Fixes Bugzilla #3923.
  • Loading branch information
maiself committed Aug 7, 2018
1 parent a37d3e0 commit e714f65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/haptic/linux/SDL_syshaptic.c
Expand Up @@ -181,6 +181,9 @@ SDL_SYS_HapticInit(void)
SDL_UDEV_Quit();
return SDL_SetError("Could not setup haptic <-> udev callback");
}

/* Force a scan to build the initial device list */
SDL_UDEV_Scan();
#endif /* SDL_USE_LIBUDEV */

return numhaptics;
Expand Down

0 comments on commit e714f65

Please sign in to comment.