Add hotplug support to DInput and XInput controller backends

This commit is contained in:
Michael M
2017-11-10 12:30:37 -08:00
committed by Jordan Woyak
parent 92ca6e124e
commit d26c1ce24d
5 changed files with 123 additions and 10 deletions

View File

@ -92,6 +92,8 @@ void PopulateDevices()
if (!hXInput)
return;
g_controller_interface.RemoveDevice([](const auto* dev) { return dev->GetSource() == "XInput"; });
XINPUT_CAPABILITIES caps;
for (int i = 0; i != 4; ++i)
if (ERROR_SUCCESS == PXInputGetCapabilities(i, 0, &caps))