DInputManager

Engine/source/platformWin32/winDirectInput.h

More...

Private Types

Parent 

Private Static Attributes

Number of milliseconds to skip checking an xinput device if it was disconnected on last check.

Private Functions

bool
acquire(U8 deviceType, U8 deviceID)
buildXInputEvent(U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue)
fireXInputButtonEvent(S32 controllerID, bool forceFire, S32 button, InputObjectInstances objInst)
fireXInputConnectEvent(S32 controllerID, bool condition, bool connected)
fireXInputMoveEvent(S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue)
unacquire(U8 deviceType, U8 deviceID)

Private Static Functions

BOOL CALLBACK
EnumDevicesProc(const DIDEVICEINSTANCE * pddi, LPVOID pvRef)

Public Functions

bool
const char *
getXInputState(S32 controllerID, S32 property, bool current)
bool
isXInputConnected(S32 controllerID)
bool

Called when the object is added to the sim.

Called when a SimObject is deleted.

Called when the object is removed from the sim.

bool
rumble(const char * pDeviceName, F32 x, F32 y)

Detailed Description

Private Types

typedef SimGroup Parent 

Private Attributes

LPDIRECTINPUT8 mDInputInterface 
HMODULE mDInputLib 
FN_XInputGetState mfnXInputGetState 
FN_XInputSetState mfnXInputSetState 
bool mJoystickActive 
U32 mLastDisconnectTime [XINPUT_MAX_CONTROLLERS]
bool mXInputActive 
bool mXInputDeadZoneOn 
HMODULE mXInputLib 
XINPUT_CONTROLLER_STATE mXInputStateNew [XINPUT_MAX_CONTROLLERS]
XINPUT_CONTROLLER_STATE mXInputStateOld [XINPUT_MAX_CONTROLLERS]
bool mXInputStateReset 

Private Static Attributes

const U32 csmDisconnectedSkipDelay 

Number of milliseconds to skip checking an xinput device if it was disconnected on last check.

bool smJoystickEnabled 
bool smXInputEnabled 

Private Functions

acquire(U8 deviceType, U8 deviceID)

buildXInputEvent(U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, F32 fValue)

enumerateDevices()

fireXInputButtonEvent(S32 controllerID, bool forceFire, S32 button, InputObjectInstances objInst)

fireXInputConnectEvent(S32 controllerID, bool condition, bool connected)

fireXInputMoveEvent(S32 controllerID, bool condition, InputObjectInstances objInst, F32 fValue)

processXInput()

unacquire(U8 deviceType, U8 deviceID)

Private Static Functions

EnumDevicesProc(const DIDEVICEINSTANCE * pddi, LPVOID pvRef)

Public Functions

DInputManager()

activateJoystick()

activateXInput()

deactivateJoystick()

deactivateXInput()

disable()

Reimplemented from: InputManager

enable()

Reimplemented from: InputManager

getJoystickAxesString(U32 deviceID)

getXInputState(S32 controllerID, S32 property, bool current)

isJoystickActive()

isXInputActive()

isXInputConnected(S32 controllerID)

onAdd()

Reimplemented from: SimObject

onDeleteNotify(SimObject * object)

Reimplemented from: SimSet

onRemove()

Reimplemented from: SimGroup

process()

Reimplemented from: InputManager

resetXInput()

rumble(const char * pDeviceName, F32 x, F32 y)