- Timestamp:
- Aug 22, 2009, 11:16:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2/src/ois/win32/Win32InputManager.cpp
r1505 r5668 75 75 hInst = GetModuleHandle(0); 76 76 77 //Create the device77 //Create the input system 78 78 hr = DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&mDirectInput, NULL ); 79 79 if (FAILED(hr)) … … 82 82 //Ok, now we have DirectInput, parse whatever extra settings were sent to us 83 83 _parseConfigSettings( paramList ); 84 85 // Enumerate devices ... 84 86 _enumerateDevices(); 85 87 } … … 116 118 { 117 119 //Enumerate all attached devices 118 mDirectInput->EnumDevices(NULL , _DIEnumKbdCallback, this, DIEDFL_ATTACHEDONLY);119 } 120 121 //--------------------------------------------------------------------------------// 122 BOOL CALLBACK Win32InputManager::_DIEnum KbdCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)120 mDirectInput->EnumDevices(NULL , _DIEnumDevCallback, this, DIEDFL_ATTACHEDONLY); 121 } 122 123 //--------------------------------------------------------------------------------// 124 BOOL CALLBACK Win32InputManager::_DIEnumDevCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) 123 125 { 124 126 Win32InputManager *_this_ = static_cast<Win32InputManager*>(pvRef); 127 128 // Register only game devices (keyboard and mouse are managed differently). 125 129 if( GET_DIDEVICE_TYPE(lpddi->dwDevType) == DI8DEVTYPE_JOYSTICK || 126 130 GET_DIDEVICE_TYPE(lpddi->dwDevType) == DI8DEVTYPE_GAMEPAD ||
Note: See TracChangeset
for help on using the changeset viewer.