Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 7, 2010, 8:21:33 PM (14 years ago)
Author:
rgrieder
Message:

Updated OIS source files to its current SVN trunk (r26).

File:
1 edited

Legend:

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

    r5781 r7506  
    2121    3. This notice may not be removed or altered from any source distribution.
    2222*/
    23 #include "Win32/Win32InputManager.h"
    24 #include "Win32/Win32Keyboard.h"
    25 #include "Win32/Win32Mouse.h"
    26 #include "Win32/Win32JoyStick.h"
     23#include "win32/Win32InputManager.h"
     24#include "win32/Win32KeyBoard.h"
     25#include "win32/Win32Mouse.h"
     26#include "win32/Win32JoyStick.h"
    2727#include "OISException.h"
    2828
     
    7575        hInst = GetModuleHandle(0);
    7676
    77         //Create the input system
     77        //Create the device
    7878        hr = DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&mDirectInput, NULL );
    7979    if (FAILED(hr))     
     
    118118{
    119119        //Enumerate all attached devices
    120         mDirectInput->EnumDevices(NULL , _DIEnumDevCallback, this, DIEDFL_ATTACHEDONLY);
     120        mDirectInput->EnumDevices(NULL, _DIEnumDevCallback, this, DIEDFL_ATTACHEDONLY);
     121
     122#ifdef OIS_WIN32_XINPUT_SUPPORT
     123        //let's check how many possible XInput devices we may have (max 4)...
     124        for(int i = 0; i < 3; ++i)
     125        {
     126                XINPUT_STATE state;
     127                if(XInputGetState(i, &state) != ERROR_DEVICE_NOT_CONNECTED)
     128                {       //Once we found 1, just check our whole list against devices
     129                        Win32JoyStick::CheckXInputDevices(unusedJoyStickList);
     130                        break;
     131                }
     132        }
     133#endif
    121134}
    122135
     
    134147        {
    135148                JoyStickInfo jsInfo;
     149                jsInfo.isXInput = false;
     150                jsInfo.productGuid = lpddi->guidProduct;
    136151                jsInfo.deviceID = lpddi->guidInstance;
    137152                jsInfo.vendor = lpddi->tszInstanceName;
Note: See TracChangeset for help on using the changeset viewer.