Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
332 stars 20 forks source link

Device Hotplugging / AUTOCONNECT Setting #117

Closed ForOhForError closed 6 months ago

ForOhForError commented 6 months ago

Added AUTOCONNECT setting, controlling a thread that polls SDL_NumJoysticks every second; if the value doesn't match the last polled value, execute RECONNECT_CONTROLLERS.

Pretty rough implementation; regardless, it seems to work well enough.

I'm new to the project and very rusty with C++, so feel free to suggest changes.

ForOhForError commented 6 months ago

May need additional work to slot in well for virtual controller mappings - looks like it might be detecting the new controller and cutting it off in a weird way.