summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
index 8c518335a0..d6ecdb9d81 100644
--- a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.cpp
@@ -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))
@@ -192,6 +194,11 @@ void Device::UpdateMotors()
}
}
+std::optional<int> Device::GetPreferredId() const
+{
+ return m_index;
+}
+
// GET name/source/id
std::string Device::Button::GetName() const