IXtfInputClient::ConnectGamepad Method

Creates a virtual controller, and gets the device identifier for it.

Syntax

public:
HRESULT ConnectGamepad(
         UINT64 *pControllerId
)  

Parameters

pControllerId
Type: UINT64 *

Pointer to a UINT64 that receives the device identifier of this IXtfInputClient.

Return value

Type: HRESULT 

HRESULT success or error code.

Remarks

ConnectGamepad allocates system resources for each virtual controller created. Your code should always pair a call to ConnectGamepad with a call to DisconnectGamepad to ensure that these system resources are freed for reuse.

Your code should wait 2 seconds after calling ConnectGamepad before calling SendGamepadReport, to ensure that the console has finished registering the new controller and is ready to accept input.

Requirements

Header: Declared in xtfinput.h.

Library: Use xtfinput.lib.