Skip to content

Commit aea9f5b

Browse files
authored
Fix SDL controller reversed y axis in UI (#574)
1 parent c78b3da commit aea9f5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gui/input/settings/DefaultControllerSettings.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ void DefaultControllerSettings::on_timer(wxTimerEvent& event)
248248
m_controller->apply_axis_setting(state.rotation, default_state.rotation, m_settings.rotation);
249249
m_controller->apply_axis_setting(state.trigger, default_state.trigger, m_settings.trigger);
250250

251+
if (m_controller->api() == InputAPI::SDLController)
252+
{
253+
state.axis.y *= -1;
254+
state.rotation.y *= -1;
255+
}
256+
251257
m_axis_draw->SetDeadzone(m_settings.axis.deadzone);
252258
m_axis_draw->SetAxisValue(state.axis);
253259

0 commit comments

Comments
 (0)