Skip to main content

XGameStreamingGetDisplayDetails

This API returns display details of the specified client. This can be used to make informed decisions like what custom aspect ratios to render at or what resolution to use to enable DirectCapture.

Syntax

Parameters

client   _In_
Type: XGameStreamingClientId
The streaming client that is being queried. maxSupportedPixels   _In_
Type: uint32_t
The maximum number of pixels supported by the game. widestSupportedAspectRatio   _In_
Type: float
The widest aspect ratio supported by the game. This is computed from width / height using the widest supported resolution. tallestSupportedAspectRatio   _In_
Type: float
The tallest aspect ratio supported by the game. This is computed from width / height using the tallest supported resolution. displayDetails   _Out_
Type: XGameStreamingDisplayDetails*
The display details of the streaming client.

Return value

Type: HRESULT Returns S_OK if successful; otherwise, returns an error code.

Potential Errors

For a list of error codes, see Error Codes.

Remarks

The data within displayDetails can be used to drive aspects of the game such as the resolution to render the game and to inform where to place critical info or UI to ensure it is interactable and not obscured. The preferredWidth and preferredHeight within the displayDetails struct is based on the actual display on the streaming client, limitations based on the streaming system, and the parameters provided by the game (maxSupportedPixels, widestSupportedAspectRatio, tallestSupportedAspectRatio). Keep in mind that the data may not available at game startup and that it may not necessarily be available at the time of the client connected event so games should either use events or polling.

Example

Requirements

Header: xgamestreaming.h
Library: xgameruntime.lib
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XGameStreaming XGameStreamingDisplayDetails XGameStreamingRegisterClientPropertiesChanged XGameStreamingSetResolution Custom Resolution Overview
Last modified on August 20, 2026