1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-04-17 00:15:25 +00:00

fix incorrect joystick numbering when joystick_disable_swap=1

With joystick_disable_swap=1 and 1x USB joystick connected - both usb and DB9 (port 2) enumerated as first joystick.
I'm not sure about purpose of all this cryptic logic in joystick_renumber(), but hope this little fix shouldn't break anything.
This commit is contained in:
Eugene Lozovoy
2024-10-07 22:36:23 +03:00
parent 28821d0922
commit ac21ae30a5

View File

@@ -734,7 +734,7 @@ static uint8_t joystick_renumber(uint8_t j) {
// if one usb joystick is present, then physical joystick 1 (joystick port)
// becomes physical joystick 0 (mouse) port. If more than 1 usb joystick
// is present it becomes 2,3,...
if(usb_sticks == 1) j = 0;
if(usb_sticks == 1) j = mist_cfg.joystick_disable_swap? 1 : 0;
else j = usb_sticks;
}