Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
Accesses static information about the full properties and capabilities of an input device.
Syntax
HRESULT GetDeviceInfo(
const GameInputDeviceInfo** info
);
Parameters
info _Outptr_
Type: GameInputDeviceInfo**
The device info associated with the IGameInputDevice.
Return value
Type: HRESULT
Function result.
Remarks
The GetDeviceInfo method memory is not owned by the application. The memory will remain accessible if the IGameInput instance is kept alive by the application. Once the reference to the IGameInput object is released, the memory goes away.
The following code example demonstrates how to determine whether a racing wheel has a clutch.
bool HasClutch(IGameInputDevice* wheel) noexcept
{
const GameInputDeviceInfo* wheelInfo = nullptr;
const bool succeeded = wheel->GetDeviceInfo(&wheelInfo);
assert(succeeded);
assert(wheelInfo->racingWheelInfo);
const bool hasClutch = wheelInfo->racingWheelInfo->hasClutch;
return hasClutch;
}
Requirements
Header: GameInput.h