haptic: Fix initial detection of haptic devices on Linux system
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. --HG-- extra : histedit_source : 3244924c52322015bb86e5aa1168270ac457f7f7
This commit is contained in:
parent
ab526d283f
commit
b193f2c097
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue