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

# XGameStreamingIsTouchInputEnabled

> XGameStreamingIsTouchInputEnabled

# XGameStreamingIsTouchInputEnabled

检查指定的流式处理客户端设备是否会向游戏发送触摸输入。

## 语法

```cpp theme={null}
HRESULT XGameStreamingIsTouchInputEnabled(  
         XGameStreamingClientId client,  
         bool* touchInputEnabled  
)  
```

### 参数

*client*   \_In\_\
类型：XGameStreamingClientId

要查询触摸属性的客户端。

*touchInputEnabled*   \_Out\_\
类型：bool\*

如果流式处理客户端设备既能够接收触摸输入**并且**当前配置为将触摸输入传递给游戏，则返回 true。

### 返回值

类型：HRESULT

如果成功，则返回 **S\_OK**；否则返回错误代码。

#### 潜在错误

| 错误代码                                     | 错误值        | 错误原因                                                                                                                                       |
| ---------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| E\_GAMESTREAMING\_NOT\_INITIALIZED       | 0x89245400 | XGameStreaming 运行时尚未初始化。在调用其他 API 之前，请先调用 [XGameStreamingInitialize](/reference/system/xgamestreaming/functions/xgamestreaminginitialize)。 |
| E\_GAMESTREAMING\_CLIENT\_NOT\_CONNECTED | 0x89245401 | 指定的客户端未连接。                                                                                                                                 |
| E\_GAMESTREAMING\_NO\_DATA               | 0x89245402 | 请求的数据不可用。数据可能稍后可用。                                                                                                                         |

有关错误代码列表，请参阅[错误代码](/reference/errorcodes)。

## 备注

默认情况下，只有通过 Content Test Application 在支持触摸的设备上进行流式传输时，`XGameStreamingIsTouchInputEnabled` 才会返回 `true`。在你的游戏配置为启用触摸输入之前，任何生产玩家都不会在其客户端流式传输中启用触摸输入。

如果游戏想要响应触摸输入启用或禁用的更改，则应通过 [XGameStreamingRegisterClientPropertiesChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterclientpropertieschanged) 注册回调。

## 要求

**标头：** xgamestreaming.h

**库：** xgameruntime.lib

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XGameStreamingClientPropertiesChangedCallback](/reference/system/xgamestreaming/functions/xgamestreamingclientpropertieschangedcallback)\
[XGameStreamingRegisterClientPropertiesChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterclientpropertieschanged)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingClientProperty](/zh-CN/reference/system/xgamestreaming/enums/xgamestreamingclientproperty.md)
- [XGameStreaming](/zh-CN/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingHideTouchControls](/zh-CN/reference/system/xgamestreaming/functions/xgamestreaminghidetouchcontrols.md)
- [XGameStreamingUpdateTouchControlsState](/zh-CN/reference/system/xgamestreaming/functions/xgamestreamingupdatetouchcontrolsstate.md)
- [XGameStreamingTouchControlsStateOperation](/zh-CN/reference/system/xgamestreaming/structs/xgamestreamingtouchcontrolsstateoperation.md)
