XUserFindControllerForUserWithUiAsync
Shows a dialog that will prompt the user to turn on and identify which controller they want to use.Syntax
Parameters
user _In_Type: XUserHandle The XUserHandle of the user for which to find a controller. async _In_
Type: XAsyncBlock* An XAsyncBlock for polling for the call’s status and retrieving call results.
Return value
Type: HRESULT HRESULT success or error code. For a list of error codes, see Error Codes.Remarks
On desktop, this function will not show UI. To get the results of what controller the user has selected, there are a couple of choices.- Call XUserFindControllerForUserWithUiResult. This will return the device ID of the now bound controller.
- Get the result from the XUserDeviceAssociationChangedCallback callback that will happen when the user has selected their new controller.
Requirements
Header: XUser.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
XUserDealing with Controller Loss (NDA topic)
