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

# IGameInputDevice::GetFlightStickInfo

> ボタン、ハット スイッチ、軸のラベルなど、デバイスのフライト スティックのプロパティを取得します。

ボタン、ハット スイッチ、軸のラベルなど、デバイスのフライト スティックのプロパティを取得します。

## 構文

```cpp theme={null}
bool GetFlightStickInfo(
    GameInputFlightStickInfo* info
);
```

### パラメーター

*info*   \_Out\_\
型: [GameInputFlightStickInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputflightstickinfo.md)\*

デバイスのフライト スティックのプロパティを受け取る `GameInputFlightStickInfo` 構造体へのポインター。デバイスがフライト スティック入力をサポートしていない場合、構造体のすべてのメンバーは 0 に設定されます。

### 戻り値

型: bool

デバイスがフライト スティック入力をサポートしていて、*info* にデータが格納された場合は `true`。それ以外の場合は `false`。

## 解説

`GetFlightStickInfo` メソッドは、デバイスのフライト スティックのプロパティを、呼び出し元が用意した構造体にコピーします。[GetSupportedInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md) から返される値に `GameInputKindFlightStick` が含まれている場合、そのデバイスはフライト スティック入力をサポートしています。デバイスがフライト スティック入力をサポートしていない場合、`GetFlightStickInfo` は *info* を 0 で初期化し、`false` を返します。

ラベル メンバーは、対応するコントロールに印字されている表示を [GameInputLabel](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputlabel.md) 値として記述するため、UI に一致するプロンプトを表示できます。`extraButtonCount` メンバーと `extraAxisCount` メンバーは、標準のフライト スティック マッピングを超えてデバイスが備えているコントローラーのボタンと軸の数を報告します。読み取りのコントローラー状態内でそれらの位置を特定するには、[GetExtraButtonIndexes](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes.md) と [GetExtraAxisIndexes](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxisindexes.md) を使用します。フライト スティックの状態は、[IGameInputReading::GetFlightStickState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getflightstickstate.md) を使用して読み取りから取得します。

このメソッドによって返されるプロパティはデバイスの有効期間中は固定されているため、一度 (たとえば、デバイスの接続時に) クエリを実行して結果をキャッシュできます。

次の例は、デバイスのフライト スティックのプロパティをクエリする方法を示しています。

```cpp theme={null}
GameInputFlightStickInfo info;
if (device->GetFlightStickInfo(&info))
{
    GameInputLabel firePrimary = info.firePrimaryButtonLabel;
    // ...
}
```

GameInput v3 以前では、この情報は [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) から返される [GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 構造体の `flightStickInfo` メンバーから取得できました。

## 要件

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

**ライブラリ:** gameinput.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

## 関連項目

[GameInput の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[GameInputFlightStickInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputflightstickinfo.md)\
[GetSupportedInput](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)\
[GameInputKind](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputkind.md)\
[GameInputLabel](https://docs.xbox.com/ja-jp/reference/input/gameinput/enums/gameinputlabel.md)\
[IGameInputReading::GetFlightStickState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getflightstickstate.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v4** | 導入されました。 |


## Related topics

- [GameInputFlightStickInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputflightstickinfo.md)
- [IGameInputDevice::GetArcadeStickInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getarcadestickinfo.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
- [IGameInputDevice::GetKeyboardInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getkeyboardinfo.md)
- [IGameInputDevice::GetGamepadInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getgamepadinfo.md)
