InputCommon:SDL: Add SDL 2.26 left and right motion inputs

This commit is contained in:
TellowKrinkle
2022-11-24 14:49:11 -06:00
parent 7be4c90f67
commit 72eadc6520
2 changed files with 43 additions and 25 deletions

View File

@ -161,16 +161,16 @@ private:
class MotionInput : public Input
{
public:
MotionInput(const char* name, SDL_GameController* gc, SDL_SensorType type, int index,
MotionInput(std::string name, SDL_GameController* gc, SDL_SensorType type, int index,
ControlState scale)
: m_name(name), m_gc(gc), m_type(type), m_index(index), m_scale(scale){};
: m_name(std::move(name)), m_gc(gc), m_type(type), m_index(index), m_scale(scale){};
std::string GetName() const override { return m_name; };
bool IsDetectable() const override { return false; };
ControlState GetState() const override;
private:
const char* m_name;
std::string m_name;
SDL_GameController* const m_gc;
SDL_SensorType const m_type;