IGameInputReading::GetTouchState

Note

This function is only supported if both XGameStreamingIsStreaming and XGameStreamingIsTouchEnabled are both returning true.

Retrieves the state from all touch digitizers.

Syntax

uint32_t GetTouchState(  
         uint32_t stateArrayCount,  
         GameInputTouchState* stateArray  
)  

Parameters

stateArrayCount   _In_
Type: uint32_t

Number of touch points on the game controller. This is acquired by calling IGameInputReading::GetTouchCount.

stateArray   _Out_writes_(stateArrayCount)
Type: GameInputTouchState*

Pointer to the array of returned touch states.

Return value

Type: uint32_t

Returns the number of valid buffers.

Remarks

The IGameInputReading::GetTouchState method targets touchpads, pen/touchscreen digitizers, or other touch-sensitive surfaces that are part of a controller. The coordinate data for touch state is always linearly normalized to the range [-1.0, 1.0], and like mouse state does not correlate with screen-space coordinates in any way.

Each GameInputTouchState structure contains information about a single touch point on a specific digitizer. The required size of the state array can be determined by calling IGameInputReading::GetTouchCount.

Requirements

Header: GameInput.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

Advanced GameInput topics
Overview of GameInput
IGameInputReading