speps/XInputDotNet — pull request #8 by benblo (2014-07-09 13:29:38+00:00)
Title: support for the Guide/Home button

Hi!
I've come across a (rather hacky) way to get the state of the Guide/Home button: see https://github.com/DieKatzchen/GuideButtonPoller/blob/master/GuideButtonPoller.cpp (via http://forums.tigsource.com/index.php?topic=26792.0).
So I've injected support for it, starting in XInputInterface::GamePad::XInputGamePadGetStateHack, then adding the Guide button to GamePadButtons, and to the demo & reporter apps.

It works nicely... but, I'll admit I don't have a clue what I'm doing when it comes to WINAPI! The hack loads the xinput1_3.dll using a hard-coded path (tried the XINPUT_DLL found in Xinput.h, no luck), and it loads/unloads it every time XInputGamePadGetStateHack is called, which is probably insane.
But hey maybe you have an idea to do it properly?

Oh and also this is my very first pull request on github (or anywhere) so please don't hesitate to tell me if I'm doing something wrong ;) !
Cheers, Ben