mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 08:39:49 -06:00
Plugin that should eventually replace the GCPad and emulated Wiimote plugin:
It's currently only really usable on Windows. Linux/OS X will need keyboard support added in, but SDL should work for joysticks on non-Windows without too many modifications. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5254 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -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
|
Reference in New Issue
Block a user