Syntax
Parameters
infoArrayCount   _In_Type: uint32_t Number of elements in infoArray. To retrieve all force feedback motors, pass the value returned by GetForceFeedbackMotorCount. infoArray   _Out_writes_to_opt_(infoArrayCount, return)
Type: GameInputForceFeedbackMotorInfo* Pointer to an array that receives one structure per force feedback motor. Can be
nullptr, in which case nothing is written and the method returns 0.
Return value
Type: uint32_t The number of elements written to infoArray. This is the smaller of infoArrayCount and the number of force feedback motors on the device, or 0 if infoArray isnullptr or the device has no force feedback motors.
Remarks
Each element is a GameInputForceFeedbackMotorInfo structure that describes the axes the corresponding motor drives and the force feedback effect types it supports. Call GetForceFeedbackMotorCount to get the number of force feedback motors, allocate an array of that size, and then callGetForceFeedbackMotorInfo to fill it. If infoArrayCount is smaller than the number of force feedback motors, only the first infoArrayCount elements are written. The force feedback motors of a device don’t change while the device is connected, so you can query them once and cache the result.
Element i of the info array describes the motor that has motor index i. Use that index as the motorIndex parameter of CreateForceFeedbackEffect, IsForceFeedbackMotorPoweredOn, and SetForceFeedbackMotorGain.
The following example shows how to retrieve the force feedback motors of a device.
forceFeedbackMotorInfo member of the GameInputDeviceInfo structure returned by IGameInputDevice::GetDeviceInfo.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputGetForceFeedbackMotorCount
GameInputForceFeedbackMotorInfo
CreateForceFeedbackEffect
IsForceFeedbackMotorPoweredOn
SetForceFeedbackMotorGain
Force feedback on GameInput
IGameInputDevice
