From d8906d2a0ca92b636b2e228da6431621e0cc9479 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Tue, 13 Apr 2010 05:15:38 +0000 Subject: Commited my new wiimote plugin work so far. Some code was copied from the current wiimote plugin. I have cleaned up most of the functions, but there are still a bunch of unused structs and stuff that I need to clean up. Moved ControllerInterface to InputCommon. Moved GCPadNew GUI/Config code to a new project, InputPluginCommon. It is used by both GCPadNew and WiimoteNew. I hope that I included everyone's fixes to GCPadNew and ControllerInterface. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5355 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../DirectInput/DirectInput.cpp | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp (limited to 'Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp') 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& 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 -- cgit v1.2.3