summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-11-19 16:53:23 +0100
committerGitHub <noreply@github.com>2017-11-19 16:53:23 +0100
commit38f44b2839d1cb3792f1bf517efe4a092933c43e (patch)
treebc2dad207404addb20dae8ac25d602cc5ebe9366 /Source/Core/InputCommon/ControllerInterface/Device.cpp
parent80bcc0d58d7d3b39d0e1b7973cbce34d4cf61f4e (diff)
parentc62d83a34b34fe591dca1d3c03354ff915c589f4 (diff)
Merge pull request #4853 from ligfx/always_connected
GCPadEmu: only connected if default device connected
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();
+}
}
}