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

# IGameInputReading::GetTouchState (已淘汰)

> IGameInputReading::GetTouchState

# IGameInputReading::GetTouchState

> [!WARNING]
>
> **已淘汰。** 此方法已在 GameInput v1 中移除，目前的 API 中無法使用。此方法在 PC 上從未實作。

取得讀數中所有作用中接觸點的觸控輸入狀態。

## 語法

```cpp theme={null}
uint32_t GetTouchState(
    uint32_t stateArrayCount,
    GameInputTouchState* stateArray
);
```

### 參數

*stateArrayCount*   \_In\_\
類型：uint32\_t

`stateArray` 中的元素數目。

*stateArray*   \_Out\_writes\_(stateArrayCount)\_\
類型：[GameInputTouchState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md)\*

要填入觸控接觸點資料的 [GameInputTouchState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md) 結構陣列。

### 傳回值

類型：uint32\_t

寫入 `stateArray` 的 [GameInputTouchState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md) 項目數目。

## 備註

此方法已在 v1 中移除。請先呼叫 [GetTouchCount](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchcount.md) 以判斷所需的陣列大小，然後使用適當大小的陣列呼叫 `GetTouchState`。

## 版本歷程記錄

| 版本 | 變更 |
| - | - |
| **v1** | 已移除。 |
| **v0** | 推出。 |

## 另請參閱

[已淘汰的 GameInput API 成員](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)\
[IGameInputReading::GetTouchCount](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchcount.md)\
[GameInputTouchState](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md)\
[IGameInputReading](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinputreading/igameinputreading.md)


## Related topics

- [IGameInputReading::GetTouchCount (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchcount.md)
- [GameInputTouchState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/structs/gameinputtouchstate.md)
- [IGameInputReading::GetMotionState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getmotionstate.md)
- [IGameInputReading::GetUiNavigationState (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_getuinavigationstate.md)
- [IGameInput::GetTemporalReading (已淘汰)](https://docs.xbox.com/zh-TW/reference/input/gameinput/deprecated/interfaces/igameinput/methods/igameinput_gettemporalreading.md)
