joystick: Ensure HIDAPI is initialized before calling it
This commit is contained in:
parent
e149f4c4b0
commit
c172f36bf4
2 changed files with 12 additions and 0 deletions
|
@ -120,6 +120,8 @@ IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *gui
|
|||
}
|
||||
|
||||
#ifdef SDL_JOYSTICK_HIDAPI
|
||||
SDL_HIDAPI_JoystickDriver.Init();
|
||||
|
||||
if (HIDAPI_IsDevicePresent(inpid.vendor, inpid.product, inpid.version)) {
|
||||
/* The HIDAPI driver is taking care of this device */
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue