mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
hid: Cleanup Windows joystick blacklist code, to make additions easier.
This commit is contained in:
parent
b0a20a153c
commit
85d97410d4
@ -314,31 +314,24 @@ int HID_API_EXPORT hid_exit(void)
|
||||
|
||||
int hid_blacklist(unsigned short vendor_id, unsigned short product_id)
|
||||
{
|
||||
// Corsair Gaming keyboard - Causes deadlock when asking for device details
|
||||
if ( vendor_id == 0x1B1C && product_id == 0x1B3D )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
size_t i;
|
||||
static const struct { unsigned short vid; unsigned short pid; } known_bad[] = {
|
||||
/* Causes deadlock when asking for device details... */
|
||||
{ 0x1B1C, 0x1B3D }, /* Corsair Gaming keyboard */
|
||||
{ 0x1532, 0x0109 }, /* Razer Lycosa Gaming keyboard */
|
||||
{ 0x1532, 0x010B }, /* Razer Arctosa Gaming keyboard */
|
||||
|
||||
// Razer Lycosa Gaming keyboard - Causes deadlock when asking for device details
|
||||
if ( vendor_id == 0x1532 && product_id == 0x0109 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
/* Turns into an Android controller when enumerated... */
|
||||
{ 0x0738, 0x2217 } /* SPEEDLINK COMPETITION PRO */
|
||||
};
|
||||
|
||||
// Razer Arctosa Gaming keyboard - Causes deadlock when asking for device details
|
||||
if ( vendor_id == 0x1532 && product_id == 0x010B )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
for (i = 0; i < SDL_arraysize(known_bad); i++) {
|
||||
if ((vendor_id == known_bad[i].vid) && (product_id == known_bad[i].pid)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// SPEEDLINK COMPETITION PRO - turns into an Android controller when enumerated
|
||||
if ( vendor_id == 0x0738 && product_id == 0x2217 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id)
|
||||
|
Loading…
Reference in New Issue
Block a user