Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2009, 11:16:34 PM (15 years ago)
Author:
rgrieder
Message:

Updated OIS library (still 1.2, but CVS version).
There have been some little fixes and support for force feedback on Linux (but this doesn't concern us for now…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/src/ois/win32/Win32InputManager.cpp

    r1505 r5668  
    7575        hInst = GetModuleHandle(0);
    7676
    77         //Create the device
     77        //Create the input system
    7878        hr = DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&mDirectInput, NULL );
    7979    if (FAILED(hr))     
     
    8282        //Ok, now we have DirectInput, parse whatever extra settings were sent to us
    8383        _parseConfigSettings( paramList );
     84
     85        // Enumerate devices ...
    8486        _enumerateDevices();
    8587}
     
    116118{
    117119        //Enumerate all attached devices
    118         mDirectInput->EnumDevices(NULL, _DIEnumKbdCallback, this, DIEDFL_ATTACHEDONLY);
    119 }
    120 
    121 //--------------------------------------------------------------------------------//
    122 BOOL CALLBACK Win32InputManager::_DIEnumKbdCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
     120        mDirectInput->EnumDevices(NULL , _DIEnumDevCallback, this, DIEDFL_ATTACHEDONLY);
     121}
     122
     123//--------------------------------------------------------------------------------//
     124BOOL CALLBACK Win32InputManager::_DIEnumDevCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef)
    123125{
    124126        Win32InputManager *_this_ = static_cast<Win32InputManager*>(pvRef);
     127
     128        // Register only game devices (keyboard and mouse are managed differently).
    125129        if( GET_DIDEVICE_TYPE(lpddi->dwDevType) == DI8DEVTYPE_JOYSTICK ||
    126130                GET_DIDEVICE_TYPE(lpddi->dwDevType) == DI8DEVTYPE_GAMEPAD ||
Note: See TracChangeset for help on using the changeset viewer.