summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2018-12-22 11:17:05 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2018-12-22 11:17:05 -0600
commitd5df56c6771372c2a0282495cbf6ff913aaf3368 (patch)
tree6f668c9da5b259b350962d723eec259e3f7cda41 /Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
parenta8d0afe219adbbd8394e85c6f9c31c0add12c299 (diff)
ControllerInterface: Make CoalesceExpression not set the inactive child's value (rumble) to 0. This caused rumble to not enable when a control expression was both a valid "bareword" and "complex" expression.
Diffstat (limited to 'Source/Core/InputCommon/ControlReference/ExpressionParser.cpp')
-rw-r--r--Source/Core/InputCommon/ControlReference/ExpressionParser.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
index e7ab53d488..ba3f78170d 100644
--- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
+++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
@@ -340,11 +340,7 @@ public:
}
ControlState GetValue() const override { return GetActiveChild()->GetValue(); }
- void SetValue(ControlState value) override
- {
- m_lhs->SetValue(GetActiveChild() == m_lhs ? value : 0.0);
- m_rhs->SetValue(GetActiveChild() == m_rhs ? value : 0.0);
- }
+ void SetValue(ControlState value) override { GetActiveChild()->SetValue(value); }
int CountNumControls() const override { return GetActiveChild()->CountNumControls(); }
operator std::string() const override
@@ -549,5 +545,5 @@ std::pair<ParseStatus, std::unique_ptr<Expression>> ParseExpression(const std::s
std::move(complex_result.expr));
return std::make_pair(complex_result.status, std::move(combined_expr));
}
-}
-}
+} // namespace ExpressionParser
+} // namespace ciface