diff options
| author | Matthew Parlane <parlane@gmail.com> | 2016-06-26 00:17:08 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-26 00:17:08 +1200 |
| commit | a7448271a9203aea26f05f62b75e43c5e5860e98 (patch) | |
| tree | 5e43d6ee5fcfbe74a6bacf1eba81ee0a7a44fa14 /Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp | |
| parent | 2f9a911c540473bb6cea5a9891a6a281aa2f3750 (diff) | |
| parent | 9b075556ea826699800d9478d1eed3a80368c348 (diff) | |
Merge pull request #3892 from leoetlino/ciface-synchronisation
ControllerInterface: Add synchronisation
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp index bf2c1f3e7e..ea059fde73 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp @@ -6,6 +6,7 @@ #include <map> #include <sstream> +#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/DInput/DInput.h" #include "InputCommon/ControllerInterface/DInput/DInputJoystick.h" #include "InputCommon/ControllerInterface/DInput/XInputFilter.h" @@ -16,7 +17,7 @@ namespace DInput { #define DATA_BUFFER_SIZE 32 -void InitJoystick(IDirectInput8* const idi8, std::vector<Core::Device*>& devices, HWND hwnd) +void InitJoystick(IDirectInput8* const idi8, HWND hwnd) { std::list<DIDEVICEINSTANCE> joysticks; idi8->EnumDevices(DI8DEVCLASS_GAMECTRL, DIEnumDevicesCallback, (LPVOID)&joysticks, @@ -60,7 +61,7 @@ void InitJoystick(IDirectInput8* const idi8, std::vector<Core::Device*>& devices Joystick* js = new Joystick(/*&*i, */ js_device, name_counts[joystick.tszInstanceName]++); // only add if it has some inputs/outputs if (js->Inputs().size() || js->Outputs().size()) - devices.push_back(js); + g_controller_interface.AddDevice(js); else delete js; } |
