Reputation: 3215
I want to send a button pressed signal to a game and I have read the APIs in MSDN.
But the APIs there only provide functions which get gamepad state not send signal to PC.
Can any one help me?
Upvotes: 0
Views: 1424
Reputation: 443
There is no API for sending a button pressed signal. You will have to write code that monitors the gamepad state every frame and when a button press is detected you send the signal. (Note: You detect the button press by checking the current button flag against the previous frames button flag. If they differ the button has either been pressed or released, depending on flag state.)
A few more details here: Which event to listen for during XInput events
Upvotes: 1