diff options
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp new file mode 100644 index 0000000000..2334db121c --- /dev/null +++ b/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp @@ -0,0 +1,35 @@ +#include "../ControllerInterface.h" + +#ifdef CIFACE_USE_DIRECTINPUT + +#include "DirectInput.h" + +#pragma comment(lib, "Dinput8.lib") +#pragma comment(lib, "dxguid.lib") + +namespace ciface +{ +namespace DirectInput +{ + +void Init( std::vector<ControllerInterface::Device*>& devices/*, HWND hwnd*/ ) +{ + IDirectInput8* idi8; + if ( DI_OK != DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, NULL ) ) + return; + +#ifdef CIFACE_USE_DIRECTINPUT_KBM + InitKeyboardMouse( idi8, devices ); +#endif +#ifdef CIFACE_USE_DIRECTINPUT_JOYSTICK + InitJoystick( idi8, devices/*, hwnd*/ ); +#endif + + idi8->Release(); + +} + +} +} + +#endif |
