Joystick: Remove the leftover separate slider handling

This commit is contained in:
Alexander Babikov
2024-02-18 16:37:46 +05:00
parent 1e23813057
commit d789292f65
5 changed files with 16 additions and 51 deletions

View File

@@ -118,19 +118,12 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index)
Models::AddEntry(model, QString("%1 (Y axis)").arg(plat_joystick_state[joystick].pov[d].name), 0);
}
for (int d = 0; d < plat_joystick_state[joystick].nr_sliders; d++) {
Models::AddEntry(model, plat_joystick_state[joystick].slider[d].name, 0);
}
int nr_axes = plat_joystick_state[joystick].nr_axes;
int nr_povs = plat_joystick_state[joystick].nr_povs;
int mapping = joystick_state[joystick_nr].axis_mapping[c];
if (mapping & POV_X)
cbox->setCurrentIndex(nr_axes + (mapping & 3) * 2);
else if (mapping & POV_Y)
cbox->setCurrentIndex(nr_axes + (mapping & 3) * 2 + 1);
else if (mapping & SLIDER)
cbox->setCurrentIndex(nr_axes + nr_povs * 2 + (mapping & 3));
else
cbox->setCurrentIndex(mapping);