Joystick: Fix emulated POV hat configuration
This commit is contained in:
@@ -186,7 +186,7 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index)
|
||||
Models::AddEntry(model, plat_joystick_state[joystick].axis[d].name, 0);
|
||||
}
|
||||
|
||||
int mapping = joystick_state[joystick_nr].pov_mapping[c][0];
|
||||
int mapping = joystick_state[joystick_nr].pov_mapping[c / 2][c & 1];
|
||||
int nr_povs = plat_joystick_state[joystick].nr_povs;
|
||||
if (mapping & POV_X)
|
||||
cbox->setCurrentIndex((mapping & 3) * 2);
|
||||
@@ -195,14 +195,6 @@ JoystickConfiguration::on_comboBoxDevice_currentIndexChanged(int index)
|
||||
else
|
||||
cbox->setCurrentIndex(mapping + nr_povs * 2);
|
||||
|
||||
mapping = joystick_state[joystick_nr].pov_mapping[c][1];
|
||||
if (mapping & POV_X)
|
||||
cbox->setCurrentIndex((mapping & 3) * 2);
|
||||
else if (mapping & POV_Y)
|
||||
cbox->setCurrentIndex((mapping & 3) * 2 + 1);
|
||||
else
|
||||
cbox->setCurrentIndex(mapping + nr_povs * 2);
|
||||
|
||||
ui->ct->addWidget(label, row, 0);
|
||||
ui->ct->addWidget(cbox, row, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user