From 0bf3dfda036f1da0cb26e1f266ea500fbe74f872 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 3 Jul 2010 08:04:10 +0000 Subject: New Wiimote Plugin: Added real wiimote support.(only tested on Windows, still a few probs: after refresh alt+F{5..8} x2 is needed) New Wiimote/GCPad: Re-merged Keyboard+Mouse for easier kb+mouse configuration, like before.(DirectInput doesn't support individual kb/mice anymore like I thought it did) Fixed some bugs and maybe leaks in GUI.(got rid of evil dynamic_cast) Renamed stuff from DirectInput to DInput, cause it's shorter and rhymes with XInput, I guess. (I remembered eol-style native, shuffle lost his job :P) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5822 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../DirectInput/DirectInput.cpp | 90 ---------------------- 1 file changed, 90 deletions(-) delete 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 deleted file mode 100644 index d36e76b3c1..0000000000 --- a/Source/Core/InputCommon/Src/ControllerInterface/DirectInput/DirectInput.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "../ControllerInterface.h" - -#ifdef CIFACE_USE_DIRECTINPUT - -#include "DirectInput.h" - -#include - -#ifdef CIFACE_USE_DIRECTINPUT_JOYSTICK - #include "DirectInputJoystick.h" -#endif -#ifdef CIFACE_USE_DIRECTINPUT_KEYBOARD - #include "DirectInputKeyboard.h" -#endif -#ifdef CIFACE_USE_DIRECTINPUT_MOUSE - #include "DirectInputMouse.h" -#endif - -#pragma comment(lib, "Dinput8.lib") -#pragma comment(lib, "dxguid.lib") - -namespace ciface -{ -namespace DirectInput -{ - -//BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, LPVOID pvRef) -//{ -// ((std::list*)pvRef)->push_back(*pdei); -// return DIENUM_CONTINUE; -//} - -BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) -{ - ((std::list*)pvRef)->push_back(*lpddoi); - return DIENUM_CONTINUE; -} - -BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) -{ - ((std::list*)pvRef)->push_back(*lpddi); - return DIENUM_CONTINUE; -} - -std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device) -{ - std::string out; - - DIPROPSTRING str; - ZeroMemory(&str, sizeof(str)); - str.diph.dwSize = sizeof(str); - str.diph.dwHeaderSize = sizeof(str.diph); - str.diph.dwHow = DIPH_DEVICE; - - if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph))) - { - const int size = WideCharToMultiByte(CP_ACP, 0, str.wsz, -1, NULL, 0, NULL, NULL); - char* const data = new char[size]; - if (size == WideCharToMultiByte(CP_ACP, 0, str.wsz, -1, data, size, NULL, NULL)) - out.assign(data); - delete[] data; - } - - return StripSpaces(out); -} - -void Init( std::vector& devices/*, HWND hwnd*/ ) -{ - IDirectInput8* idi8; - if (FAILED(DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, NULL))) - return; - -#ifdef CIFACE_USE_DIRECTINPUT_KEYBOARD - InitKeyboard(idi8, devices); -#endif -#ifdef CIFACE_USE_DIRECTINPUT_MOUSE - InitMouse(idi8, devices); -#endif -#ifdef CIFACE_USE_DIRECTINPUT_JOYSTICK - InitJoystick(idi8, devices/*, hwnd*/); -#endif - - idi8->Release(); - -} - -} -} - -#endif -- cgit v1.2.3