XInputGetStateWithToken
Retrieves the current state of the specified controller and associates it with a D3DX frame pipeline token.
Syntax
DWORD XInputGetStateWithToken(
DWORD dwUserIndex,
UINT64 framePipelineToken,
XINPUT_STATE * pState
)
Parameters
dwUserIndex _In_
Type: DWORD
Index of the gamer associated with the device; a value in the range of 0 to XUSER_MAX_COUNT - 1
.
framePipelineToken _In_
Type: UINT64
D3DX frame pipeline token.
pState _Out_
Type: XINPUT_STATE*
Pointer to an XINPUT_STATE object that receives the current state of the controller.
Return value
Type: DWORD
If the function succeeds, it returns ERROR_SUCCESS
.
If the controller is not connected, the function returns ERROR_DEVICE_NOT_CONNECTED
.
If the function fails, it returns an error code defined in WinError.h.
Remarks
This function is similar to XInputGetState, but it associates a specific input reading with a graphics frame for later analysis.
Note
As of the May Preview release, the behavior of XInputGetStateWithToken
is identical to that of XInputGetState
, because the underlying GameInput code is not fully implemented.
By supplying the frame pipeline token, you can later correlate input API calls with specific graphics frames in the PIX software.
Requirements
Header: XInputOnGameInput.h
Library: xgameruntime.lib
Supported platforms: Xbox One family consoles and Xbox Series consoles