Describes the current state of the Xbox 360 Controller.
typedef struct _XINPUT_GAMEPAD { WORD wButtons; BYTE bLeftTrigger; BYTE bRightTrigger; SHORT sThumbLX; SHORT sThumbLY; SHORT sThumbRX; SHORT sThumbRY; } XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
#define XINPUT_GAMEPAD_DPAD_UP 0x00000001 #define XINPUT_GAMEPAD_DPAD_DOWN 0x00000002 #define XINPUT_GAMEPAD_DPAD_LEFT 0x00000004 #define XINPUT_GAMEPAD_DPAD_RIGHT 0x00000008 #define XINPUT_GAMEPAD_START 0x00000010 #define XINPUT_GAMEPAD_BACK 0x00000020 #define XINPUT_GAMEPAD_LEFT_THUMB 0x00000040 #define XINPUT_GAMEPAD_RIGHT_THUMB 0x00000080 #define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 #define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 #define XINPUT_GAMEPAD_A 0x1000 #define XINPUT_GAMEPAD_B 0x2000 #define XINPUT_GAMEPAD_X 0x4000 #define XINPUT_GAMEPAD_Y 0x8000
Bits that are set but not defined above are reserved, and their state is undefined.
This structure is used by the XINPUT_STATE structure when polling for changes in the state of the controller.
The specific mapping of button to game function varies depending on the game type.
The constant XINPUT_GAMEPAD_TRIGGER_THRESHOLD may be used as the value which bLeftTrigger and bRightTrigger must be greater than to register as pressed. This is optional, but often desirable. Xbox 360 Controller buttons do not manifest crosstalk.
Header: Declared in XInput.h.