GamePad.GetState Method
Gets the current state of a game pad controller. As an option, it specifies a dead zone processing method for the analog sticks.
Overload List
Name | Description |
---|---|
GamePad.GetState (PlayerIndex) | Gets the current state of a game pad controller. |
GamePad.GetState (PlayerIndex, GamePadDeadZone) | Gets the current state of a game pad controller, using a specified dead zone on analog stick positions. |
Remarks
When you call GetState, check the returned structure's IsConnected property value. If the controller has been disconnected, this value will be false. When a controller is disconnected, values for its state will not be valid. Also, the controller will not receive any new vibration settings.
See Also
Tasks
Detecting Xbox 360 Controller Button Presses (Xbox 360, Windows)
Determining If an Xbox 360 Controller Is Disconnected (Xbox 360, Windows)
Concepts
Overview of User Input and Input Devices
Reference
GamePad Class
GamePad Members
Microsoft.Xna.Framework.Input Namespace