Joystick: Fix emulated POV hat configuration

This commit is contained in:
Alexander Babikov
2023-12-28 21:20:15 +05:00
parent b877c0c639
commit 8e50e88f7e
3 changed files with 4 additions and 12 deletions

View File

@@ -190,9 +190,9 @@ updateJoystickConfig(int type, int joystick_nr, QWidget *parent)
for (int c = 0; c < joystick_get_button_count(type); c++) {
joystick_state[joystick_nr].button_mapping[c] = jc.selectedButton(c);
}
for (int c = 0; c < joystick_get_button_count(type); c++) {
for (int c = 0; c < joystick_get_pov_count(type) * 2; c += 2) {
joystick_state[joystick_nr].pov_mapping[c][0] = get_pov(jc, c, joystick_nr);
joystick_state[joystick_nr].pov_mapping[c][1] = get_pov(jc, c, joystick_nr);
joystick_state[joystick_nr].pov_mapping[c][1] = get_pov(jc, c + 1, joystick_nr);
}
}
}