From d26c1ce24d9108114d7eab97cfc2ab4f3eea28ee Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 10 Nov 2017 12:30:37 -0800 Subject: Add hotplug support to DInput and XInput controller backends --- Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp index aacbcd55f8..e65da0eb78 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp @@ -46,6 +46,8 @@ std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device) void PopulateDevices(HWND hwnd) { + g_controller_interface.RemoveDevice([](const auto* dev) { return dev->GetSource() == "DInput"; }); + IDirectInput8* idi8; if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, nullptr))) -- cgit v1.2.3