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

# XGSetHardwareVersion (XBOX One 系列)

> 為指定的硬體版本設定 XG。

為指定的硬體版本設定 XG。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
void XGSetHardwareVersion(
         XG_HARDWARE_VERSION Version
)  
```

<a id="ID4EG" />

### 參數

*Version*\
類型：XG\_HARDWARE\_VERSION

\[in] XBOX 硬體的版本。

<a id="ID4EG" />

### 傳回值

無。

<a id="remarks" />

## 備註

若要確保 XG 的行為符合指定的硬體版本，請在呼叫其他 XG API 之前呼叫 **XGSetHardwareVersion**。

請注意，對於 XBOX Series X|S XG\_XS 程式庫，只有 XBOX Series X|S 硬體版本適用。在 XG\_XS 中將任何 XBOX\_ONE 硬體版本與 **XGSetHardwareVersion** 搭配使用，會導致啟用 XBOX Series X|S Anaconda 硬體版本。

<a id="requirements" />

## 需求

**標頭：** xg.h

**程式庫：** xg\_x.lib

**支援的平台：** XBOX One 系列

## 另請參閱

[XG 參考](/zh-TW/reference/graphics/xg__NR/xg_members)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [ILampArray::GetHardwareVersion 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_gethardwareversion.md)
- [XVersion](/zh-TW/reference/system/xgameruntimetypes/structs/xversion.md)
- [GameInputVersion](/zh-TW/reference/input/gameinput/structs/gameinputversion.md)
- [D3D12_DRED_VERSION](/zh-TW/reference/graphics/d3d12/enums/d3d12_dred_version_public.md)
