13
0

mackie: improve previous commit - use button_id not button.bid() to make remapping work

This commit is contained in:
Paul Davis 2017-01-31 17:30:50 +01:00
parent bfebad3dce
commit 16804e20c8

View File

@ -1554,7 +1554,7 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu
/* check profile first */
retry:
string action = _device_profile.get_button_action (button.bid(), _modifier_state);
string action = _device_profile.get_button_action (button_id, _modifier_state);
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("device profile returned [%1] for that button\n", action));
@ -1593,6 +1593,8 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu
return;
}
/* reset button_id to the result of the lookup */
button_id = (Button::ID) bid;
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handling button %1 as if it was %2 (%3)\n", Button::id_to_name (button.bid()), button_id, Button::id_to_name (button_id)));