> ## 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_BATTERY_INFORMATION

> XINPUT_BATTERY_INFORMATION

# XINPUT\_BATTERY\_INFORMATION

バッテリーの種類と充電状態を表します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
typedef struct XINPUT_BATTERY_INFORMATION {  
    BYTE BatteryType;  
    BYTE BatteryLevel;  
} XINPUT_BATTERY_INFORMATION  
```

<a id="membersSection" />

### メンバー

*BatteryType*\
型: BYTE

バッテリーの種類を次のいずれかの値で表します。

| 値                           | 説明                                 |
| --------------------------- | ---------------------------------- |
| BATTERY\_TYPE\_DISCONNECTED | デバイスが接続されていません。                    |
| BATTERY\_TYPE\_WIRED        | デバイスは有線接続であり、バッテリーはありません。          |
| BATTERY\_TYPE\_ALKALINE     | デバイスにアルカリ電池が搭載されています。              |
| BATTERY\_TYPE\_NIMH         | デバイスにニッケル水素 (NiMH) バッテリーが搭載されています。 |
| BATTERY\_TYPE\_UNKNOWN      | デバイスのバッテリーの種類は不明です。                |

*BatteryLevel*\
型: BYTE

満充電容量に対するバッテリーの充電状態を、次のいずれかの値で表します。

| 値                      | 説明                 |
| ---------------------- | ------------------ |
| BATTERY\_LEVEL\_EMPTY  | 残量は 0 ～ 10% です。    |
| BATTERY\_LEVEL\_LOW    | 残量は 10% ～ 40% です。  |
| BATTERY\_LEVEL\_MEDIUM | 残量は 40% ～ 70% です。  |
| BATTERY\_LEVEL\_FULL   | 残量は 70% ～ 100% です。 |

<a id="remarksSection" />

## 解説

*BatteryLevel* の値は、バッテリーの種類が判明しているデバイスでのみ有効です。

この構造体は [XInputGetBatteryInformation](/reference/input/xinputongameinput/functions/xinputgetbatteryinformation) 関数で使用されます。

詳細については、[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

- [XInputGetBatteryInformation](/ja-jp/reference/input/xinputongameinput/functions/xinputgetbatteryinformation.md)
- [XInputOnGameInput](/ja-jp/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XINPUT_GAMEPAD](/ja-jp/reference/input/xinputongameinput/structs/xinput_gamepad.md)
- [XINPUT_CAPABILITIES](/ja-jp/reference/input/xinputongameinput/structs/xinput_capabilities.md)
- [XINPUT_KEYSTROKE](/ja-jp/reference/input/xinputongameinput/structs/xinput_keystroke.md)
