summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-12-15 21:05:17 +0100
committerGitHub <noreply@github.com>2017-12-15 21:05:17 +0100
commit4733bbd8f38c0583aed0fd2faa2c9d577456bcfe (patch)
treeee324a2fd8b127160ec9bdb8d5d8b89329d02868 /Source/Core/InputCommon/ControllerInterface/Device.cpp
parenta4592bc3c54d37111b916d707beb2152fdebf5fb (diff)
parent8e6677be90d67a652eb4bcf7d0b76f548e254172 (diff)
Merge pull request #6166 from ligfx/invokedeviceschangedcallbacks
ControllerInterface: cleanup callbacks API and logic
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.cpp b/Source/Core/InputCommon/ControllerInterface/Device.cpp
index 3c0add95f2..b8d73d9ab8 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Device.cpp
@@ -2,12 +2,14 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include "InputCommon/ControllerInterface/Device.h"
+
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
-#include "InputCommon/ControllerInterface/Device.h"
+#include "Common/StringUtil.h"
namespace ciface
{
@@ -39,6 +41,11 @@ void Device::AddOutput(Device::Output* const o)
m_outputs.push_back(o);
}
+std::string Device::GetQualifiedName() const
+{
+ return StringFromFormat("%s/%i/%s", this->GetSource().c_str(), GetId(), this->GetName().c_str());
+}
+
Device::Input* Device::FindInput(const std::string& name) const
{
for (Input* input : m_inputs)