diff options
| author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2016-10-16 13:39:05 -0700 |
|---|---|---|
| committer | Michael Maltese <michaeljosephmaltese@gmail.com> | 2016-11-30 16:07:55 -0800 |
| commit | 3e69d066f5e9ad0a1097d806c656035398bbb7bc (patch) | |
| tree | dd7ab461e209f81876a2b2145a5595812512eb6c /Source/Core/InputCommon/ControllerInterface/DInput | |
| parent | cebb4d84f2a8021a5df2ff2a9d31eba16e1cb5e5 (diff) | |
ControllerInterface: replace Reinitialize with RefreshDevices
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/DInput/DInput.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp index 83394852af..aacbcd55f8 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp @@ -44,7 +44,7 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device) return result; } -void Init(HWND hwnd) +void PopulateDevices(HWND hwnd) { IDirectInput8* idi8; if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h index 94e4cb4fe3..951eabebb9 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h @@ -20,6 +20,6 @@ BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVO BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef); std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device); -void Init(HWND hwnd); +void PopulateDevices(HWND hwnd); } } |
