diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp b/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp index 4e46179fc6..222791f03f 100644 --- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp +++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp @@ -242,6 +242,18 @@ std::shared_ptr<Device> DeviceContainer::FindDevice(const DeviceQualifier& devq) return nullptr; } +std::vector<std::shared_ptr<Device>> DeviceContainer::GetAllDevices() const +{ + std::lock_guard lk(m_devices_mutex); + + std::vector<std::shared_ptr<Device>> devices; + + for (const auto& d : m_devices) + devices.emplace_back(d); + + return devices; +} + std::vector<std::string> DeviceContainer::GetAllDeviceStrings() const { std::lock_guard lk(m_devices_mutex); |
