mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-19 08:41:39 +00:00
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.
This commit is contained in:
parent
a8d0afe219
commit
d5df56c677
1 changed files with 3 additions and 7 deletions
|
@ -340,11 +340,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
ControlState GetValue() const override { return GetActiveChild()->GetValue(); }
|
ControlState GetValue() const override { return GetActiveChild()->GetValue(); }
|
||||||
void SetValue(ControlState value) override
|
void SetValue(ControlState value) override { GetActiveChild()->SetValue(value); }
|
||||||
{
|
|
||||||
m_lhs->SetValue(GetActiveChild() == m_lhs ? value : 0.0);
|
|
||||||
m_rhs->SetValue(GetActiveChild() == m_rhs ? value : 0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int CountNumControls() const override { return GetActiveChild()->CountNumControls(); }
|
int CountNumControls() const override { return GetActiveChild()->CountNumControls(); }
|
||||||
operator std::string() const override
|
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));
|
std::move(complex_result.expr));
|
||||||
return std::make_pair(complex_result.status, std::move(combined_expr));
|
return std::make_pair(complex_result.status, std::move(combined_expr));
|
||||||
}
|
}
|
||||||
}
|
} // namespace ExpressionParser
|
||||||
}
|
} // namespace ciface
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue