Initial xinput support, fix msvc build