Merge pull request #288 from pinumbernumber/master

Add XInput support (and misc fixes)
Clone from upstream with MinGW build script.