Share via


IXtfInputClient::SendGamepadReportEx

Sends a controller state report to the console.

Syntax

HRESULT SendGamepadReportEx(  
         UINT64 controllerId,  
         GAMEPAD_REPORT_EX report  
)  

Parameters

controllerId   
Type: UINT64

The device identifier of this IXtfInputClient.
The controller ID is the controller ID returned by IXtfInputClient::ConnectGamepad.

report   
Type: GAMEPAD_REPORT_EX

The controller state to report.

Return value

Type: HRESULT

HRESULT success or error code.

Remarks

The SendGameReportEx method sends a controller state represented by a GAMEPAD_REPORT_EX to a virtual controller created by IXtfInputClient::ConnectGamepad. You will need to send multiple states to simulate a single button press and release. To simulate a button press, call SendGamepadReportEx with the appropriate flag set in GAMEPAD_REPORT_EX.Buttons, and then call SendGamepadReportEx again, with GAMEPAD_REPORT_EX.Buttons set to GAMEPAD_BUTTONS::NONE.

SendGamepadReportEx can be called at 60Hz to mimic data coming from a physical controller.

Requirements

Header: XtfInput.h

Library: xtfinput.lib

Supported platforms: Windows (for Xbox console tools)

See also

XtfInput
GAMEPAD_REPORT_EX
IXtfInputClient::ConnectGamepad