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

# GetAspectRatio (XBOX Series 主機)

> 取得顯示長寬比。

取得顯示長寬比。

## 語法

```cpp theme={null}
HRESULT GetAspectRatio(  
         DXGI_RATIONAL* pAspectRatio  
)  
```

### 參數

*pAspectRatio*   \_Out\_\
類型：DXGI\_RATIONAL\*

長寬比資訊的指標。

### 傳回值

類型：HRESULT

成功時傳回 S\_OK；以無效參數呼叫時傳回 E\_INVALIDARG。

## 備註

在 XBOX Series X|S 上，此方法一律傳回 16:9 的值。

## 需求

**標頭：** d3d12\_xs.h

**程式庫：** d3d12\_xs.lib\
**支援的平台：** XBOX Series 主機

## 另請參閱

[IDXGIOutput](/zh-TW/reference/graphics/d3d12_xs/interfaces/IDXGIOutput/idxgioutput)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [Best Practices for Game Streaming Custom Resolution](/build/core-features/common/game-streaming/game-streaming-custom-resolution-best-practices.md)
- [XGameStreamingGetDisplayDetails](/reference/system/xgamestreaming/functions/xgamestreaminggetdisplaydetails.md)
- [Testing With Custom Resolution](/build/core-features/common/game-streaming/game-streaming-testing-custom-resolution.md)
- [Procedimientos recomendados para la resolución personalizada en Game Streaming](/es/build/core-features/common/game-streaming/game-streaming-custom-resolution-best-practices.md)
