Skip to content

Commit

Permalink
Fix SDL controller reversed y axis in UI (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tillsunset committed Dec 14, 2022
1 parent c78b3da commit aea9f5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/input/settings/DefaultControllerSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ void DefaultControllerSettings::on_timer(wxTimerEvent& event)
m_controller->apply_axis_setting(state.rotation, default_state.rotation, m_settings.rotation);
m_controller->apply_axis_setting(state.trigger, default_state.trigger, m_settings.trigger);

if (m_controller->api() == InputAPI::SDLController)
{
state.axis.y *= -1;
state.rotation.y *= -1;
}

m_axis_draw->SetDeadzone(m_settings.axis.deadzone);
m_axis_draw->SetAxisValue(state.axis);

Expand Down

0 comments on commit aea9f5b

Please sign in to comment.