Question

I want to check in my C# project if the A Button of my Xbox 360 Controller is pressed. I've tried XNA and slimDX but it won't work. Can someone give me advice how it probably will work?

Was it helpful?

Solution

in XNA

GamePadState currentState = GamePad.GetState(PlayerIndex.One);

if (currentState.IsConnected && currentState.Buttons.A == ButtonState.Pressed)
{

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top