From what I could tell, SDL has a game controller api that's very
similar to xinput, which is pretty nice, and it can be configured to map to any controller. So, although it is a heavy dependency, it could get us a good solution very quickly.
Few other advantages: * The resulting xinput library could be used on Windows to support non-xinput-compatible controllers. * Steam has a controller configuration GUI, which happens to be compatible with SDL. The only alternative for picking up this configuration would be to duplicate logic from SDL. (Admittedly, this only helps for Wine-based ports of games on Steam, and possibly other games when Steam is used as a launcher.)
We have very little control over heavy dependencies like SDL and can end up with unfixable bugs. One immediate concern is that SDL sets up signal handlers during initialization.
I'd be interested in seeing your code for this even without the cleanup.