Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sends a controller state report to the console.
Syntax
public:
HRESULT SendGamepadReport(
UINT64 controllerId,
GAMEPAD_REPORT 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
The controller state to report
Return value
Type: HRESULT
HRESULT success or error code.
Remarks
The SendGameReport method sends a controller state represented by a GAMEPAD_REPORT 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 SendGamepadReport with the appropriate flag set in GAMEPAD_REPORT.Buttons, and then call SendGamepadReport again, with GAMEPAD_REPORT.Buttons set to GAMEPAD_BUTTONS::NONE.
SendGamepadReport 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)