DInputManager Class Reference#include <winDirectInput.h>
Inheritance diagram for DInputManager:
[legend]List of all members.
|
Public Member Functions |
| | DInputManager () |
| bool | enable () |
| void | disable () |
| void | onDeleteNotify (SimObject *object) |
| | Called when a SimObject is deleted.
|
| bool | onAdd () |
| | Called when the object is added to the sim.
|
| void | onRemove () |
| | Called when the object is removed from the sim.
|
| void | process () |
| bool | activateJoystick () |
| void | deactivateJoystick () |
| bool | isJoystickActive () |
| bool | activateXInput () |
| void | deactivateXInput () |
| bool | isXInputActive () |
| void | resetXInput () |
| bool | isXInputConnected (int controllerID) |
| int | getXInputState (int controllerID, int property, bool current) |
| const char * | getJoystickAxesString (U32 deviceID) |
| bool | rumble (const char *pDeviceName, float x, float y) |
Static Public Member Functions |
| static void | init () |
| static bool | enableJoystick () |
| static void | disableJoystick () |
| static bool | isJoystickEnabled () |
| static bool | enableXInput () |
| static void | disableXInput () |
| static bool | isXInputEnabled () |
Private Types |
| typedef SimGroup | Parent |
Private Member Functions |
| void | enumerateDevices () |
| bool | acquire (U8 deviceType, U8 deviceID) |
| void | unacquire (U8 deviceType, U8 deviceID) |
| void | buildXInputEvent (U32 deviceInst, InputEventType objType, InputObjectInstances objInst, InputActionType action, float fValue) |
| void | fireXInputConnectEvent (int controllerID, bool condition, bool connected) |
| void | fireXInputMoveEvent (int controllerID, bool condition, InputObjectInstances objInst, float fValue) |
| void | fireXInputButtonEvent (int controllerID, bool forceFire, int button, InputObjectInstances objInst) |
| void | processXInput () |
Static Private Member Functions |
| static BOOL CALLBACK | EnumDevicesProc (const DIDEVICEINSTANCE *pddi, LPVOID pvRef) |
Private Attributes |
| HMODULE | mXInputLib |
| FN_XInputGetState | mfnXInputGetState |
| FN_XInputSetState | mfnXInputSetState |
| XINPUT_CONTROLLER_STATE | mXInputStateOld [XINPUT_MAX_CONTROLLERS] |
| XINPUT_CONTROLLER_STATE | mXInputStateNew [XINPUT_MAX_CONTROLLERS] |
| U32 | mLastDisconnectTime [XINPUT_MAX_CONTROLLERS] |
| bool | mXInputStateReset |
| bool | mXInputDeadZoneOn |
| HMODULE | mDInputLib |
| LPDIRECTINPUT8 | mDInputInterface |
| bool | mJoystickActive |
| bool | mXInputActive |
Static Private Attributes |
| static const U32 | csmDisconnectedSkipDelay = 250 |
| | Number of milliseconds to skip checking an xinput device if it was disconnected on last check.
|
| static bool | smJoystickEnabled |
| static bool | smXInputEnabled |
Member Typedef Documentation
Constructor & Destructor Documentation
| DInputManager::DInputManager |
( |
|
) |
|
Member Function Documentation
| void DInputManager::enumerateDevices |
( |
|
) |
[private] |
| static BOOL CALLBACK DInputManager::EnumDevicesProc |
( |
const DIDEVICEINSTANCE * |
pddi, |
|
|
LPVOID |
pvRef | |
|
) |
| | [static, private] |
| bool DInputManager::acquire |
( |
U8 |
deviceType, |
|
|
U8 |
deviceID | |
|
) |
| | [private] |
| void DInputManager::unacquire |
( |
U8 |
deviceType, |
|
|
U8 |
deviceID | |
|
) |
| | [private] |
| void DInputManager::fireXInputConnectEvent |
( |
int |
controllerID, |
|
|
bool |
condition, |
|
|
bool |
connected | |
|
) |
| | [private] |
| void DInputManager::processXInput |
( |
|
) |
[private] |
| bool DInputManager::enable |
( |
|
) |
[virtual] |
| void DInputManager::disable |
( |
|
) |
[virtual] |
| void DInputManager::onDeleteNotify |
( |
SimObject * |
object |
) |
[virtual] |
Called when a SimObject is deleted.
When you are on the notification list for another object and it is deleted, this method is called.
Reimplemented from SimSet.
| bool DInputManager::onAdd |
( |
|
) |
[virtual] |
Called when the object is added to the sim.
Reimplemented from SimObject.
| void DInputManager::onRemove |
( |
|
) |
[virtual] |
Called when the object is removed from the sim.
Reimplemented from SimGroup.
| void DInputManager::process |
( |
|
) |
[virtual] |
| static void DInputManager::init |
( |
|
) |
[static] |
| static bool DInputManager::enableJoystick |
( |
|
) |
[static] |
| static void DInputManager::disableJoystick |
( |
|
) |
[static] |
| static bool DInputManager::isJoystickEnabled |
( |
|
) |
[static] |
| bool DInputManager::activateJoystick |
( |
|
) |
|
| void DInputManager::deactivateJoystick |
( |
|
) |
|
| bool DInputManager::isJoystickActive |
( |
|
) |
[inline] |
| static bool DInputManager::enableXInput |
( |
|
) |
[static] |
| static void DInputManager::disableXInput |
( |
|
) |
[static] |
| static bool DInputManager::isXInputEnabled |
( |
|
) |
[static] |
| bool DInputManager::activateXInput |
( |
|
) |
|
| void DInputManager::deactivateXInput |
( |
|
) |
|
| bool DInputManager::isXInputActive |
( |
|
) |
[inline] |
| void DInputManager::resetXInput |
( |
|
) |
[inline] |
| bool DInputManager::isXInputConnected |
( |
int |
controllerID |
) |
|
| int DInputManager::getXInputState |
( |
int |
controllerID, |
|
|
int |
property, |
|
|
bool |
current | |
|
) |
| | |
| const char* DInputManager::getJoystickAxesString |
( |
U32 |
deviceID |
) |
|
| bool DInputManager::rumble |
( |
const char * |
pDeviceName, |
|
|
float |
x, |
|
|
float |
y | |
|
) |
| | |
Member Data Documentation
Number of milliseconds to skip checking an xinput device if it was disconnected on last check.
|