XINPUT_STATE structure

Represents the state of a controller.

Syntax

typedef struct _XINPUT_STATE {
  DWORD          dwPacketNumber;
  XINPUT_GAMEPAD Gamepad;
} XINPUT_STATE, *PXINPUT_STATE;

Members

        `dwPacketNumber`

        State packet number. The packet number indicates whether there have been any changes in the state of the controller. If the <i>dwPacketNumber</i> member is the same in sequentially returned <b>XINPUT_STATE</b> structures, the controller state has not changed.
    
    
        `Gamepad`

        <a href="https://docs.microsoft.com/windows/desktop/api/xinput/ns-xinput-xinput_gamepad">XINPUT_GAMEPAD</a> structure containing the current state of an Xbox 360 Controller.
    

## Remarks
    The <i>dwPacketNumber</i> member is incremented only if the status of the controller has changed since the controller was last polled.

Requirements

   
Header xinput.h
## See Also

    <a href="https://docs.microsoft.com/windows/desktop/api/xinput/ns-xinput-xinput_gamepad">XINPUT_GAMEPAD</a>

XInput Structures

XInputGetState