> ## 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 執行階段尚未初始化。請先呼叫 [XGameStreamingInitialize](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminginitialize)，再呼叫其他 API。 |
| E\_GAMESTREAMING\_CLIENT\_NOT\_CONNECTED | 0x89245401 | 指定的用戶端未連線。 |
| E\_GAMESTREAMING\_NO\_DATA | 0x89245402 | 要求的資料無法使用。資料稍後可能會可供使用。 |

如需錯誤碼清單，請參閱[錯誤碼](/zh-TW/reference/errorcodes)。

## 備註

根據預設，只有在支援觸控的裝置上透過 Content Test Application 進行串流時，`XGameStreamingIsTouchInputEnabled` 才會傳回 `true`。在您的遊戲設定為啟用觸控輸入之前，任何正式環境玩家的用戶端串流都不會啟用觸控輸入。

如果遊戲想要回應觸控輸入啟用或停用的變更，應透過 [XGameStreamingRegisterClientPropertiesChanged](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingregisterclientpropertieschanged) 註冊回呼。

## 需求

**標頭：** xgamestreaming.h

**程式庫：** xgameruntime.lib

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

## 另請參閱

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


## Related topics

- [XGameStreamingIsTouchInputEnabled](/ko/reference/system/xgamestreaming/functions/xgamestreamingistouchinputenabled.md)
- [XGameStreamingClientProperty](/reference/system/xgamestreaming/enums/xgamestreamingclientproperty.md)
- [XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members.md)
