summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
index e29c9d53e3..69e340d4f5 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
@@ -419,6 +419,29 @@ void ControllerInterface::UpdateReference(ControllerInterface::ControlReference*
devc.control = *i;
ref->m_controls.push_back(devc);
}
+ else
+ {
+ // the input wasn't found, look through all the other devices
+
+ std::vector<Device*>::const_iterator
+ deviter = m_devices.begin(),
+ devend = m_devices.end();
+
+ for(; deviter != devend; ++deviter)
+ {
+ for(i = (*deviter)->Inputs().begin(); i < (*deviter)->Inputs().end(); ++i)
+ if(*(*i) == ctrl_str)
+ break;
+
+ if ((*deviter)->Inputs().end() != i)
+ {
+ devc.device = *deviter;
+ devc.control = *i;
+ ref->m_controls.push_back(devc);
+ break;
+ }
+ }
+ }
}
else
{