> ## 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::GetRacingWheelInfo

> コントロールのラベル、ペダル、シフター、最大ホイール角度など、デバイスのレーシング ホイールのプロパティを取得します。

コントロールのラベル、ペダル、シフター、最大ホイール角度など、デバイスのレーシング ホイールのプロパティを取得します。

## 構文

```cpp theme={null}
bool GetRacingWheelInfo(
    GameInputRacingWheelInfo* info
);
```

### パラメーター

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

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

### 戻り値

型: bool

デバイスがレーシング ホイール入力をサポートしていて、*info* にデータが格納された場合は `true`。それ以外の場合は `false`。

## 解説

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

`hasClutch`、`hasHandbrake`、`hasPatternShifter` の各メンバーはどのオプションのコントロールが存在するかを報告し、`minPatternShifterGear` と `maxPatternShifterGear` はパターン シフターのギア範囲を、`maxWheelAngle` はホイールの最大回転角度を示します。ラベル メンバーは、対応するコントロールに印字されている表示を [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::GetRacingWheelState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getracingwheelstate.md) を使用して読み取りから取得します。

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

次の例は、デバイスのレーシング ホイールのプロパティをクエリする方法を示しています。

```cpp theme={null}
GameInputRacingWheelInfo info;
if (device->GetRacingWheelInfo(&info))
{
    if (info.hasClutch)
    {
        // Enable manual clutch controls.
    }
}
```

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) 構造体の `racingWheelInfo` メンバーから取得できました。

## 要件

**ヘッダー:** 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)\
[GameInputRacingWheelInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputracingwheelinfo.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::GetRacingWheelState](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getracingwheelstate.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## バージョン履歴

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


## Related topics

- [GameInputRacingWheelInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/structs/gameinputracingwheelinfo.md)
- [IGameInputDevice::GetMouseInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getmouseinfo.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)
