diff --git a/src/common/input/InputDevice.h b/src/common/input/InputDevice.h index be42e4cf3..75d2d8210 100644 --- a/src/common/input/InputDevice.h +++ b/src/common/input/InputDevice.h @@ -146,31 +146,6 @@ public: m_Bindings[XButton] = Control; } -protected: - class FullAnalogSurface : public Input - { - public: - FullAnalogSurface(Input* Low, Input* High) : m_Low(*Low), m_High(*High) {} - ControlState GetState() const override - { - return (1 + m_High.GetState() - m_Low.GetState()) / 2; - } - - std::string GetName() const override { return m_Low.GetName() + *m_High.GetName().rbegin(); } - - private: - Input& m_Low; - Input& m_High; - }; - - void AddAnalogInputs(Input* Low, Input* High) - { - AddInput(Low); - AddInput(High); - AddInput(new FullAnalogSurface(Low, High)); - AddInput(new FullAnalogSurface(High, Low)); - } - private: // arbitrary ID assigned by to the device int m_ID; diff --git a/src/common/input/SdlJoystick.cpp b/src/common/input/SdlJoystick.cpp index 33e19a747..0fe4ee835 100644 --- a/src/common/input/SdlJoystick.cpp +++ b/src/common/input/SdlJoystick.cpp @@ -301,7 +301,8 @@ namespace Sdl // get axes for (i = 0; i != NumAxes; ++i) { // each axis gets a negative and a positive input instance associated with it - AddAnalogInputs(new Axis(i, m_Joystick, -32768), new Axis(i, m_Joystick, 32767)); + AddInput(new Axis(i, m_Joystick, -32768)); + AddInput(new Axis(i, m_Joystick, 32767)); } // try to get supported ff effects