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

# GameInputControllerSwitchInfo

> GameInputControllerSwitchInfo

# GameInputControllerSwitchInfo

描述輸入裝置上的開關。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
struct GameInputControllerSwitchInfo
{
    GameInputLabel      labels[GAMEINPUT_MAX_SWITCH_STATES];
    GameInputSwitchKind kind;
};
```

<a id="membersSection" />

### 成員

*labels*<br />
類型：[GameInputLabel](/zh-TW/reference/input/gameinput/enums/gameinputlabel)

開關狀態的標籤。

*kind*<br />
類型：[GameInputSwitchKind](/zh-TW/reference/input/gameinput/enums/gameinputswitchkind)

開關的類型。

<a id="remarksSection" />

## 備註

此結構用於 [GameInputControllerInfo](/zh-TW/reference/input/gameinput/structs/gameinputcontrollerinfo) 結構中。`GameInputControllerInfo` 由 [GameInputDeviceInfo](/zh-TW/reference/input/gameinput/structs/gameinputdeviceinfo) 結構用來描述控制器輸入裝置的屬性。

<a id="requirementsSection" />

## 需求

**標頭：** GameInput.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[GameInput 概觀](/zh-TW/build/core-features/common/input/overviews/input-overview)\
[GameInput](/zh-TW/reference/input/gameinput/gameinput_members)

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v3** | **已移除** `mappedInputKinds`。將單一的 `label` 取代為陣列 `labels[GAMEINPUT_MAX_SWITCH_STATES]`。 |
| **v1** | **已移除** `positionLabels[9]`，以及所有舊版/原始 HID 和 DInput 欄位 (`legacyDInputIndex`、`legacyHidIndex`、`rawReportIndex`、原始報告指標)。 |
| **v0** | 推出。 |

## 附錄：先前版本

### v1, v2

```cpp theme={null}
struct GameInputControllerSwitchInfo
{
    GameInputKind       mappedInputKinds;
    GameInputLabel      label;
    GameInputSwitchKind kind;
};
```

### v0

```cpp theme={null}
struct GameInputControllerSwitchInfo
{
    GameInputKind       mappedInputKinds;
    GameInputLabel      label;
    GameInputLabel      positionLabels[9];
    GameInputSwitchKind kind;
    uint8_t             legacyDInputIndex;
    uint8_t             legacyHidIndex;
    uint16_t            rawReportIndex;
};
```


## Related topics

- [GameInputControllerSwitchInfo](/reference/input/gameinput/structs/gameinputcontrollerswitchinfo.md)
- [GameInputControllerInfo](/reference/input/gameinput/structs/gameinputcontrollerinfo.md)
- [GameInputSwitchKind](/reference/input/gameinput/enums/gameinputswitchkind.md)
- [GameInputLabel](/reference/input/gameinput/enums/gameinputlabel.md)
