> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XINPUT_STATE

> XINPUT_STATE

# XINPUT\_STATE

コントローラーの状態を表します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
typedef struct XINPUT_STATE {  
    DWORD dwPacketNumber;  
    XINPUT_GAMEPAD Gamepad;  
} XINPUT_STATE  
```

<a id="membersSection" />

### メンバー

*dwPacketNumber*\
型: DWORD

状態パケット番号。パケット番号は、コントローラーの状態が変化したかどうかを示します。連続して返される `XINPUT_STATE` オブジェクトで値が同じである場合、コントローラーの状態は変化していません。

*Gamepad*\
型: [XINPUT\_GAMEPAD](/reference/input/xinputongameinput/structs/xinput_gamepad)

コントローラーの現在の状態を含む [XINPUT\_GAMEPAD](/reference/input/xinputongameinput/structs/xinput_gamepad) オブジェクト。

<a id="remarksSection" />

## 解説

*dwPacketNumber* の値は、コントローラーが前回ポーリングされてから状態が変化した場合にのみ増加します。

この構造体は [XInputGetState](/reference/input/xinputongameinput/functions/xinputgetstate) および [XInputGetStateWithToken](/reference/input/xinputongameinput/functions/xinputgetstatewithtoken) 関数で使用されます。

詳細については、[XInputOnGameInput ラッパー](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection)を参照してください。

<a id="requirementsSection" />

## 要件

**ヘッダー:** XInputOnGameInput.h

**対応プラットフォーム:** XBOX One ファミリー本体および XBOX Series 本体

<a id="seealsoSection" />

## 関連項目

[XInput から GameInput への移植](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [XInputGetState](/ja-jp/reference/input/xinputongameinput/functions/xinputgetstate.md)
- [XInputGetStateWithToken](/ja-jp/reference/input/xinputongameinput/functions/xinputgetstatewithtoken.md)
- [XINPUT_GAMEPAD](/ja-jp/reference/input/xinputongameinput/structs/xinput_gamepad.md)
- [XInputOnGameInput](/ja-jp/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_VIBRATION](/ja-jp/reference/input/xinputongameinput/structs/xinput_vibration.md)
