From 928a6ef4beca221c88ffc7481f14d2428ede7cdf Mon Sep 17 00:00:00 2001 From: Térence Clastres Date: Sun, 12 Aug 2018 00:44:28 +0200 Subject: Fix track select right led wrong behaviour --- libs/surfaces/launch_control_xl/launch_control_xl.cc | 10 +++++----- 1 file 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(id_controller_button_map[SelectLeft]); SelectButton* sr = static_cast(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 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; -- cgit v1.2.3