Remove unused GetAxisByCodeName
This commit is contained in:
parent
2cc303c8a7
commit
bc20b8820f
14 changed files with 0 additions and 150 deletions
|
|
@ -84,11 +84,6 @@ bool AnalogController::DoState(StateWrapper& sw, bool apply_input_state)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogController::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogController::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -657,24 +652,6 @@ std::unique_ptr<AnalogController> AnalogController::Create(u32 index)
|
|||
return std::make_unique<AnalogController>(index);
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogController::StaticGetAxisCodeByName(std::string_view axis_name)
|
||||
{
|
||||
#define AXIS(name) \
|
||||
if (axis_name == #name) \
|
||||
{ \
|
||||
return static_cast<s32>(ZeroExtend32(static_cast<u8>(Axis::name))); \
|
||||
}
|
||||
|
||||
AXIS(LeftX);
|
||||
AXIS(LeftY);
|
||||
AXIS(RightX);
|
||||
AXIS(RightY);
|
||||
|
||||
return std::nullopt;
|
||||
|
||||
#undef AXIS
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogController::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ public:
|
|||
~AnalogController() override;
|
||||
|
||||
static std::unique_ptr<AnalogController> Create(u32 index);
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view axis_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
|
|
@ -53,7 +52,6 @@ public:
|
|||
static SettingList StaticGetSettings();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
|
|
@ -59,11 +59,6 @@ bool AnalogJoystick::DoState(StateWrapper& sw, bool apply_input_state)
|
|||
return true;
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogJoystick::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogJoystick::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -250,24 +245,6 @@ std::unique_ptr<AnalogJoystick> AnalogJoystick::Create(u32 index)
|
|||
return std::make_unique<AnalogJoystick>(index);
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogJoystick::StaticGetAxisCodeByName(std::string_view axis_name)
|
||||
{
|
||||
#define AXIS(name) \
|
||||
if (axis_name == #name) \
|
||||
{ \
|
||||
return static_cast<s32>(ZeroExtend32(static_cast<u8>(Axis::name))); \
|
||||
}
|
||||
|
||||
AXIS(LeftX);
|
||||
AXIS(LeftY);
|
||||
AXIS(RightX);
|
||||
AXIS(RightY);
|
||||
|
||||
return std::nullopt;
|
||||
|
||||
#undef AXIS
|
||||
}
|
||||
|
||||
std::optional<s32> AnalogJoystick::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public:
|
|||
~AnalogJoystick() override;
|
||||
|
||||
static std::unique_ptr<AnalogJoystick> Create(u32 index);
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view axis_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
|
|
@ -51,7 +50,6 @@ public:
|
|||
static SettingList StaticGetSettings();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
|
|
@ -85,11 +85,6 @@ std::unique_ptr<Controller> Controller::Create(ControllerType type, u32 index)
|
|||
}
|
||||
}
|
||||
|
||||
std::optional<s32> Controller::GetAxisCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<s32> Controller::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return std::nullopt;
|
||||
|
|
@ -179,34 +174,6 @@ u32 Controller::GetVibrationMotorCount(ControllerType type)
|
|||
}
|
||||
}
|
||||
|
||||
std::optional<s32> Controller::GetAxisCodeByName(ControllerType type, std::string_view axis_name)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ControllerType::DigitalController:
|
||||
return DigitalController::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::AnalogController:
|
||||
return AnalogController::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::AnalogJoystick:
|
||||
return AnalogJoystick::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::NamcoGunCon:
|
||||
return NamcoGunCon::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::PlayStationMouse:
|
||||
return PlayStationMouse::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::NeGcon:
|
||||
return NeGcon::StaticGetAxisCodeByName(axis_name);
|
||||
|
||||
case ControllerType::None:
|
||||
default:
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<s32> Controller::GetButtonCodeByName(ControllerType type, std::string_view button_name)
|
||||
{
|
||||
switch (type)
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ public:
|
|||
/// Returns the type of controller.
|
||||
virtual ControllerType GetType() const = 0;
|
||||
|
||||
/// Gets the integer code for an axis in the specified controller type.
|
||||
virtual std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const;
|
||||
|
||||
/// Gets the integer code for a button in the specified controller type.
|
||||
virtual std::optional<s32> GetButtonCodeByName(std::string_view button_name) const;
|
||||
|
||||
|
|
@ -72,9 +69,6 @@ public:
|
|||
/// Creates a new controller of the specified type.
|
||||
static std::unique_ptr<Controller> Create(ControllerType type, u32 index);
|
||||
|
||||
/// Gets the integer code for an axis in the specified controller type.
|
||||
static std::optional<s32> GetAxisCodeByName(ControllerType type, std::string_view axis_name);
|
||||
|
||||
/// Gets the integer code for a button in the specified controller type.
|
||||
static std::optional<s32> GetButtonCodeByName(ControllerType type, std::string_view button_name);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,6 @@ ControllerType DigitalController::GetType() const
|
|||
return ControllerType::DigitalController;
|
||||
}
|
||||
|
||||
std::optional<s32> DigitalController::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> DigitalController::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -139,11 +134,6 @@ std::unique_ptr<DigitalController> DigitalController::Create()
|
|||
return std::make_unique<DigitalController>();
|
||||
}
|
||||
|
||||
std::optional<s32> DigitalController::StaticGetAxisCodeByName(std::string_view button_name)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<s32> DigitalController::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -32,14 +32,12 @@ public:
|
|||
~DigitalController() override;
|
||||
|
||||
static std::unique_ptr<DigitalController> Create();
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view button_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
static u32 StaticGetVibrationMotorCount();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
|
|
@ -16,11 +16,6 @@ ControllerType NamcoGunCon::GetType() const
|
|||
return ControllerType::NamcoGunCon;
|
||||
}
|
||||
|
||||
std::optional<s32> NamcoGunCon::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> NamcoGunCon::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -203,11 +198,6 @@ std::unique_ptr<NamcoGunCon> NamcoGunCon::Create()
|
|||
return std::make_unique<NamcoGunCon>();
|
||||
}
|
||||
|
||||
std::optional<s32> NamcoGunCon::StaticGetAxisCodeByName(std::string_view button_name)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<s32> NamcoGunCon::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ public:
|
|||
~NamcoGunCon() override;
|
||||
|
||||
static std::unique_ptr<NamcoGunCon> Create();
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view button_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
|
|
@ -28,7 +27,6 @@ public:
|
|||
static SettingList StaticGetSettings();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@ ControllerType NeGcon::GetType() const
|
|||
return ControllerType::NeGcon;
|
||||
}
|
||||
|
||||
std::optional<s32> NeGcon::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> NeGcon::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -215,24 +210,6 @@ std::unique_ptr<NeGcon> NeGcon::Create()
|
|||
return std::make_unique<NeGcon>();
|
||||
}
|
||||
|
||||
std::optional<s32> NeGcon::StaticGetAxisCodeByName(std::string_view axis_name)
|
||||
{
|
||||
#define AXIS(name) \
|
||||
if (axis_name == #name) \
|
||||
{ \
|
||||
return static_cast<s32>(ZeroExtend32(static_cast<u8>(Axis::name))); \
|
||||
}
|
||||
|
||||
AXIS(Steering);
|
||||
AXIS(I);
|
||||
AXIS(II);
|
||||
AXIS(L);
|
||||
|
||||
return std::nullopt;
|
||||
|
||||
#undef AXIS
|
||||
}
|
||||
|
||||
std::optional<s32> NeGcon::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ public:
|
|||
~NeGcon() override;
|
||||
|
||||
static std::unique_ptr<NeGcon> Create();
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view axis_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
|
|
@ -42,7 +41,6 @@ public:
|
|||
static SettingList StaticGetSettings();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
|
|
@ -19,11 +19,6 @@ ControllerType PlayStationMouse::GetType() const
|
|||
return ControllerType::PlayStationMouse;
|
||||
}
|
||||
|
||||
std::optional<s32> PlayStationMouse::GetAxisCodeByName(std::string_view axis_name) const
|
||||
{
|
||||
return StaticGetAxisCodeByName(axis_name);
|
||||
}
|
||||
|
||||
std::optional<s32> PlayStationMouse::GetButtonCodeByName(std::string_view button_name) const
|
||||
{
|
||||
return StaticGetButtonCodeByName(button_name);
|
||||
|
|
@ -172,11 +167,6 @@ std::unique_ptr<PlayStationMouse> PlayStationMouse::Create()
|
|||
return std::make_unique<PlayStationMouse>();
|
||||
}
|
||||
|
||||
std::optional<s32> PlayStationMouse::StaticGetAxisCodeByName(std::string_view button_name)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<s32> PlayStationMouse::StaticGetButtonCodeByName(std::string_view button_name)
|
||||
{
|
||||
#define BUTTON(name) \
|
||||
|
|
|
|||
|
|
@ -18,14 +18,12 @@ public:
|
|||
~PlayStationMouse() override;
|
||||
|
||||
static std::unique_ptr<PlayStationMouse> Create();
|
||||
static std::optional<s32> StaticGetAxisCodeByName(std::string_view button_name);
|
||||
static std::optional<s32> StaticGetButtonCodeByName(std::string_view button_name);
|
||||
static AxisList StaticGetAxisNames();
|
||||
static ButtonList StaticGetButtonNames();
|
||||
static u32 StaticGetVibrationMotorCount();
|
||||
|
||||
ControllerType GetType() const override;
|
||||
std::optional<s32> GetAxisCodeByName(std::string_view axis_name) const override;
|
||||
std::optional<s32> GetButtonCodeByName(std::string_view button_name) const override;
|
||||
|
||||
void Reset() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue