ControllerInterface: Make FullAnalogSurface inherit IsDetectable()

This commit is contained in:
Martino Fontana 2023-10-28 16:32:01 +02:00
parent 115ad82581
commit 0ab2bc2287
2 changed files with 6 additions and 0 deletions

View file

@ -136,6 +136,11 @@ std::string Device::FullAnalogSurface::GetName() const
return "Full " + m_high.GetName();
}
bool Device::FullAnalogSurface::IsDetectable() const
{
return m_low.IsDetectable() && m_high.IsDetectable();
}
bool Device::FullAnalogSurface::IsMatchingName(std::string_view name) const
{
if (Control::IsMatchingName(name))

View file

@ -163,6 +163,7 @@ protected:
FullAnalogSurface(Input* low, Input* high) : m_low(*low), m_high(*high) {}
ControlState GetState() const override;
std::string GetName() const override;
bool IsDetectable() const override;
bool IsMatchingName(std::string_view name) const override;
private: