mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 00:32:49 +00:00
Fix gamepad disconnect on unrecognized HID device (#13321)
== DETAILS So, the reason the gamepad was getting deregistered was because adapter free code wasn't properly handling null-interface adapters, causing the gamepad to match erroneously and get deregistered. This doesn't fix the weird "Generic SNES USB" detection issue, but it should make it non-fatal. Co-authored-by: Nathan Strong <nstrong@tripwire.com>
This commit is contained in:
parent
b6695d8921
commit
bf9706395d
@ -469,7 +469,10 @@ static void synchronized_process_adapters(wiiu_hid_t *hid)
|
||||
else
|
||||
prev->next = adapter->next;
|
||||
|
||||
pad_connection_pad_deregister(joypad_state.pads, adapter->pad_driver, adapter->pad_driver_data);
|
||||
if(adapter->pad_driver && adapter->pad_driver_data)
|
||||
{
|
||||
pad_connection_pad_deregister(joypad_state.pads, adapter->pad_driver, adapter->pad_driver_data);
|
||||
}
|
||||
/* adapter is no longer valid after this point */
|
||||
delete_adapter(adapter);
|
||||
/* signal not to update prev ptr since adapter is now invalid */
|
||||
|
Loading…
x
Reference in New Issue
Block a user