Make sure HIDAPI is initialized whenever we call HIDAPI_IsDevicePresent()

This commit is contained in:
Sam Lantinga
2019-07-31 10:20:37 -07:00
parent c172f36bf4
commit c10a87429d
2 changed files with 5 additions and 2 deletions

View File

@@ -120,8 +120,6 @@ 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;