ignore HatState::Centered when configuring input (#151)

This commit is contained in:
Logan McNaughton
2025-01-15 07:33:31 +01:00
committed by GitHub
parent eae81c4623
commit 45d05cecf0
+8 -6
View File
@@ -407,12 +407,14 @@ pub fn configure_input_profile(ui: &mut ui::Ui, profile: String) {
key_set = true
}
sdl2::event::Event::JoyHatMotion { hat_idx, state, .. } => {
new_joystick_hat[*value] = (
true,
hat_idx as u32,
sdl2::joystick::HatState::to_raw(state),
);
key_set = true
if state != sdl2::joystick::HatState::Centered {
new_joystick_hat[*value] = (
true,
hat_idx as u32,
sdl2::joystick::HatState::to_raw(state),
);
key_set = true
}
}
sdl2::event::Event::JoyAxisMotion {
axis_idx,