Skip to main content

XGameStreamingGetGamepadPhysicality

Gets the input physicality mapping from a specific gamepad reading.

Syntax

Parameters

gamepadReading   _In_
Type: IGameInputReading*
The gamepad reading that is being queried. gamepadPhysicality   _Out_
Type: XGameStreamingGamepadPhysicality*
The physicality of the input reading.

Return value

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

Remarks

Games might need to differentiate a controller input based on whether the input was from a physically attached controller, or from a touch layout that has been translated into a virtual controller input. Example scenario The game has a jump action associated with the A button. It offers a touch layout with the jump icon configured with the A button press on the virtual controller. The game also offers players the ability to remap the physical controller in a way that A is no longer associated with jump. The game can present visual hints to interact with elements in the game (for example, Press A to jump). When the player uses the touch layouts, the visual hint should show the iconography of the touch layout’s button.

Example

In the following code example, the game has the jump action linked to the A button on the controller by default. While this setting is customizable by the player, the touch layout on the screen is fixed, and therefore an A button press from the touch layout should be treated as jump, always, while the A from a physical controller should be treated as whatever the player set for the controller mapping customization.

Requirements

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

See also

XGameStreaming
XGameStreamingGamepadPhysicality
XGameStreaming Touch Adaptation
Last modified on August 20, 2026