summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTérence Clastres <t.clastres@gmail.com>2018-08-12 00:44:28 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2018-08-15 18:48:32 -0400
commit928a6ef4beca221c88ffc7481f14d2428ede7cdf (patch)
treed4e1024a3a28c8885cd13a5423689e25154e213f
parentcb0ae63fe2449de75aa91cd26e68c8d2112d7683 (diff)
Fix track select right led wrong behaviour
-rw-r--r--libs/surfaces/launch_control_xl/launch_control_xl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc
index 7d7ffff442..7c405df7ad 100644
--- a/libs/surfaces/launch_control_xl/launch_control_xl.cc
+++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc
@@ -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;