mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-12 06:18:13 +00:00
joystick: Ensure HIDAPI is initialized before calling it
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user