summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-09-18 10:09:32 -0400
committerLioncash <mathew1800@gmail.com>2013-09-18 10:09:32 -0400
commitaf951f467e8757cd2d2fda639aa43dbd88f8dfc7 (patch)
treec33a2c84ebe79a4846bd501ac9db56cba10693e8 /Source/Core/InputCommon/Src/ControllerInterface
parentd03fb11188d147688abd19d76d818a4ba08dc060 (diff)
[InputCommon] Fix a bug in ControllerInterface::UpdateOutput() in ControllerInterface.cpp. The variable ok_count was never incremented, which caused the function to always return false.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
index f2a0414bf6..bc1e115c17 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
@@ -178,11 +178,11 @@ bool ControllerInterface::UpdateOutput(const bool force)
size_t ok_count = 0;
- std::vector<Device*>::const_iterator
- d = m_devices.begin(),
- e = m_devices.end();
- for (;d != e; ++d)
- (*d)->UpdateOutput();
+ for (auto d = m_devices.cbegin(); d != m_devices.cend(); ++d)
+ {
+ if ((*d)->UpdateOutput())
+ ++ok_count;
+ }
return (m_devices.size() == ok_count);
}