zeth / inputs

Cross-platform Python support for keyboards, mice and gamepads
BSD 3-Clause "New" or "Revised" License
269 stars 87 forks source link

Refresh connected/disconnected list #79

Open CaptainJL opened 5 years ago

CaptainJL commented 5 years ago

Hey all, I was wondering if there was a way to detect currentl connected devices. Basically I want the 'devices' list to update automatically if i disconnect or reconnect a gamepad or other device. Is there a way to see this, as it currently only reads devices seen on init of the script. Thanks,

RAvengineer commented 4 years ago
>>> from importlib import reload
>>> reload(inputs)

These 2 lines solved the problem! For more detailed explanation

millerda commented 4 years ago

This worked for me, but there really should be a better way than forcing to reload the module.