diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 10:43:46 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 10:43:46 +0200 |
| commit | 3570c7f03a2aa90aa634f96c0af1969af610f14d (patch) | |
| tree | 4252e03c0e853ba7cffe022937698c854ad0eaa9 /Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp | |
| parent | 2115e8a4a6814e32107b5205ff5c95bbd3c6e99c (diff) | |
Reformat all the things. Have fun with merge conflicts.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp index 4a68474618..09227b5932 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp @@ -16,50 +16,47 @@ namespace ciface { namespace DInput { - BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) { - ((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi); - return DIENUM_CONTINUE; + ((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi); + return DIENUM_CONTINUE; } BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef) { - ((std::list<DIDEVICEINSTANCE>*)pvRef)->push_back(*lpddi); - return DIENUM_CONTINUE; + ((std::list<DIDEVICEINSTANCE>*)pvRef)->push_back(*lpddi); + return DIENUM_CONTINUE; } std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device) { - DIPROPSTRING str = {}; - str.diph.dwSize = sizeof(str); - str.diph.dwHeaderSize = sizeof(str.diph); - str.diph.dwHow = DIPH_DEVICE; - - std::string result; - if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph))) - { - result = StripSpaces(UTF16ToUTF8(str.wsz)); - } - - return result; + DIPROPSTRING str = {}; + str.diph.dwSize = sizeof(str); + str.diph.dwHeaderSize = sizeof(str.diph); + str.diph.dwHow = DIPH_DEVICE; + + std::string result; + if (SUCCEEDED(device->GetProperty(DIPROP_PRODUCTNAME, &str.diph))) + { + result = StripSpaces(UTF16ToUTF8(str.wsz)); + } + + return result; } void Init(std::vector<Core::Device*>& devices, HWND hwnd) { - IDirectInput8* idi8; - if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, - IID_IDirectInput8, (LPVOID*)&idi8, nullptr))) - { - return; - } + IDirectInput8* idi8; + if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, + (LPVOID*)&idi8, nullptr))) + { + return; + } - InitKeyboardMouse(idi8, devices, hwnd); - InitJoystick(idi8, devices, hwnd); - - idi8->Release(); + InitKeyboardMouse(idi8, devices, hwnd); + InitJoystick(idi8, devices, hwnd); + idi8->Release(); } - } } |
