SDL/src/joystick/hidapi
Steven Noonan 4535d65491 HIDAPI_UpdateDiscovery: only treat "add" and "remove" events as relevant
I have a buggy system which reports a udev "change" event for an empty
USB-C port every 0.14 seconds, which causes annoying frame hitches
because SDL decides that means it needs to do a libusb hid_enumerate,
which is slow (~25ms!) because of the get_usb_string() calls in there.

We only need to re-enumerate if we've seen a device added or removed, so
let's filter out the change event first.

Signed-off-by: Steven Noonan <steven@valvesoftware.com>
Signed-off-by: Sam Lantinga <slouken@libsdl.org>
2021-04-22 16:40:16 -07:00
..
steam Valve contributed code is under the Zlib license 2021-01-04 12:17:24 -08:00
SDL_hidapi_gamecube.c Fixed crash if the GameCube controller hasn't been opened yet 2021-02-10 10:22:18 -05:00
SDL_hidapi_ps4.c Always lock the HIDAPI device when closing, in case rumble is pending 2021-01-14 23:49:20 -08:00
SDL_hidapi_ps5.c Use PS4 rumble hint as the default for the PS5 rumble hint 2021-01-24 00:51:24 -05:00
SDL_hidapi_rumble.c Added HIDAPI rumble debug info 2021-01-14 23:49:27 -08:00
SDL_hidapi_rumble.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hidapi_stadia.c SDL: fix packet handling for original version of Stadia FW 2021-02-10 10:22:20 -05:00
SDL_hidapi_steam.c Always lock the HIDAPI device when closing, in case rumble is pending 2021-01-14 23:49:20 -08:00
SDL_hidapi_switch.c Only change joystick->nbuttons for Joy-Cons, since they're the only ones that have these "paddles" 2021-02-22 17:54:32 -08:00
SDL_hidapi_xbox360.c avoid some pedantic warnings in array initializers 2021-02-10 10:22:20 -05:00
SDL_hidapi_xbox360w.c avoid some pedantic warnings in array initializers 2021-02-10 10:22:20 -05:00
SDL_hidapi_xboxone.c Added support for trigger rumble for all Microsoft Xbox One controllers 2021-02-11 17:28:07 -08:00
SDL_hidapijoystick.c HIDAPI_UpdateDiscovery: only treat "add" and "remove" events as relevant 2021-04-22 16:40:16 -07:00
SDL_hidapijoystick_c.h Minor cleanup 2021-01-24 00:51:26 -05:00