Skip to content
Permalink
Browse files

ControllerInterface: Make CoalesceExpression not set the inactive chi…

…ld's value (rumble) to 0. This caused rumble to not enable when a control expression was both a valid "bareword" and "complex" expression.
  • Loading branch information...
jordan-woyak committed Dec 22, 2018
1 parent a8d0afe commit d5df56c6771372c2a0282495cbf6ff913aaf3368
Showing with 3 additions and 7 deletions.
  1. +3 −7 Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
@@ -340,11 +340,7 @@ class CoalesceExpression : public Expression
}

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

0 comments on commit d5df56c

Please sign in to comment.
You can’t perform that action at this time.