13
0

Fix track select right led wrong behaviour

This commit is contained in:
Térence Clastres 2018-08-12 00:44:28 +02:00 committed by Paul Davis
parent cb0ae63fe2
commit 928a6ef4be

View File

@ -830,11 +830,6 @@ LaunchControlXL::switch_bank (uint32_t base)
SelectButton* sl = static_cast<SelectButton*>(id_controller_button_map[SelectLeft]);
SelectButton* sr = static_cast<SelectButton*>(id_controller_button_map[SelectRight]);
if (sl && sr) {
write(sl->state_msg( (base) ));
write(sr->state_msg( !(base) ));
}
/* work backwards so we can tell if we should actually switch banks */
boost::shared_ptr<Stripable> s[8];
@ -847,6 +842,11 @@ LaunchControlXL::switch_bank (uint32_t base)
}
}
if (sl && sr) {
write(sl->state_msg( (base) ));
write(sr->state_msg( (s[1] != 0) ));
}
if (!s[0]) {
/* not even the first stripable exists, do nothing */
return;