Merge pull request #8638 from jordan-woyak/is-detectable-constify
InputCommon: Constify Device::Input::IsDetectable function.
This commit is contained in:
commit
edad018213
|
@ -69,7 +69,7 @@ private:
|
|||
{
|
||||
}
|
||||
std::string GetName() const override;
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
ControlState GetState() const override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
public:
|
||||
// Things like absolute axes/ absolute mouse position should override this to prevent
|
||||
// undesirable behavior in our mapping logic.
|
||||
virtual bool IsDetectable() { return true; }
|
||||
virtual bool IsDetectable() const { return true; }
|
||||
|
||||
// Implementations should return a value from 0.0 to 1.0 across their normal range.
|
||||
// One input should be provided for each "direction". (e.g. 2 for each axis)
|
||||
|
|
|
@ -87,14 +87,14 @@ private:
|
|||
{
|
||||
public:
|
||||
using AnalogInput::AnalogInput;
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
};
|
||||
|
||||
class MotionInput final : public AnalogInput<float>
|
||||
{
|
||||
public:
|
||||
using AnalogInput::AnalogInput;
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
};
|
||||
|
||||
using AccelerometerInput = MotionInput;
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
|
||||
private:
|
||||
const BatteryState& m_battery;
|
||||
|
|
|
@ -36,7 +36,7 @@ private:
|
|||
{
|
||||
}
|
||||
std::string GetName() const override;
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
ControlState GetState() const override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -27,7 +27,7 @@ private:
|
|||
{
|
||||
public:
|
||||
std::string GetName() const;
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
Axis(int pad_id, ButtonManager::ButtonType index, float neg = 1.0f)
|
||||
: m_pad_id(pad_id), m_index(index), m_neg(neg)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool IsDetectable() override { return Detectable; }
|
||||
bool IsDetectable() const override { return Detectable; }
|
||||
|
||||
std::string GetName() const override { return m_name; }
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
Battery(const ControlState* level) : m_level(*level) {}
|
||||
std::string GetName() const override { return "Battery"; }
|
||||
ControlState GetState() const override { return m_level; }
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
|
||||
private:
|
||||
const ControlState& m_level;
|
||||
|
|
|
@ -63,7 +63,7 @@ private:
|
|||
{
|
||||
public:
|
||||
std::string GetName() const override { return name; }
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
Cursor(u8 index, bool positive, const float* cursor);
|
||||
ControlState GetState() const override;
|
||||
|
||||
|
@ -78,7 +78,7 @@ private:
|
|||
{
|
||||
public:
|
||||
std::string GetName() const override { return name; }
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
Axis(u8 index, bool positive, const float* axis);
|
||||
ControlState GetState() const override;
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ public:
|
|||
return std::string(motion_data_names[m_code]) + (m_range < 0 ? '-' : '+');
|
||||
}
|
||||
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
};
|
||||
|
||||
class CursorInput final : public Axis
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
return std::string("Cursor ") + char('X' + m_code) + (m_range < 0 ? '-' : '+');
|
||||
}
|
||||
|
||||
bool IsDetectable() override { return false; }
|
||||
bool IsDetectable() const override { return false; }
|
||||
};
|
||||
|
||||
static std::thread s_hotplug_thread;
|
||||
|
|
Loading…
Reference in New Issue