mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 19:07:40 +00:00
Reattach the kernel driver after closing USB controllers
This commit is contained in:
parent
005e2dff21
commit
4e682461cc
3 changed files with 25 additions and 0 deletions
|
@ -844,6 +844,14 @@ HIDAPI_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, cons
|
|||
}
|
||||
SDL_UnlockJoysticks();
|
||||
|
||||
/* If we're looking for the wireless XBox 360 controller, also look for the dongle */
|
||||
if (!result && vendor_id == 0x045e && product_id == 0x02a1) {
|
||||
return HIDAPI_IsDevicePresent(0x045e, 0x0719, version, name);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_HIDAPI
|
||||
SDL_Log("HIDAPI_IsDevicePresent() returning %s for 0x%.4x / 0x%.4x\n", result ? "true" : "false", vendor_id, product_id);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue