summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.cpp b/Source/Core/InputCommon/ControllerInterface/Device.cpp
index f83dae268e..48d40cb9af 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Device.cpp
@@ -199,5 +199,11 @@ Device::Output* DeviceContainer::FindOutput(const std::string& name, const Devic
{
return def_dev->FindOutput(name);
}
+
+bool DeviceContainer::HasConnectedDevice(const DeviceQualifier& qualifier) const
+{
+ const auto device = FindDevice(qualifier);
+ return device != nullptr && device->IsValid();
+}
}
}