mirror of https://github.com/encounter/SDL.git
f0cee3edec
Using Wii U GameCube USB adapter with multiple controllers attached and restarting SDL input in a game results in extra joysticks with NULL name. HIDAPI_CleanupDeviceDriver() shut down joysticks by iterating through device->num_joysticks but each HIDAPI_JoystickDisconnected() decreases device->num_joysticks and shifts joysticks array down. Resulting in only half of controllers being shutdown. It worked with only 1 controller attached though. Disconnect HIDAPI device joystick 0 until there are none left. |
||
---|---|---|
.. | ||
SDL_hidapi_gamecube.c | ||
SDL_hidapi_ps4.c | ||
SDL_hidapi_switch.c | ||
SDL_hidapi_xbox360.c | ||
SDL_hidapi_xbox360w.c | ||
SDL_hidapi_xboxone.c | ||
SDL_hidapijoystick.c | ||
SDL_hidapijoystick_c.h |