summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-11-09 12:14:21 -0800
committerMichael M <mchtly@gmail.com>2017-11-10 13:37:41 -0800
commit7355b5f70d2bdf68c356873f2311025a81c7972a (patch)
tree248e15120149e7077dcdcc3eb1b2acdd2e275815 /Source/Core/InputCommon/ControllerInterface/Device.cpp
parent126b7ea01caa6fd4eb884cda053ebb938f156c7f (diff)
ControllerInterface: invoke callbacks in AddDevice/RemoveDevice
Some backends already cause this to happen, so make it consistent across systems.
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 f83dae268e..ee28115adc 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)