13
0

Make MCP MasterPosition match MIDI port number.

This commit is contained in:
Len Ovens 2015-08-05 22:02:27 -07:00 committed by Paul Davis
parent 54ab3fb37e
commit 2a3f5d0107
2 changed files with 4 additions and 1 deletions

View File

@ -246,6 +246,8 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
if ((prop = child->property ("value")) != 0) {
if ((_master_position = atoi (prop->value().c_str())) == 0) {
_master_position = 0;
} else if (_master_position > 0) {
_master_position --;
}
}
}

View File

@ -97,7 +97,7 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
/* lets use master_position instead */
uint32_t mp = _mcp.device_info().master_position();
if (_number == mp) {
DEBUG_TRACE (DEBUG::MackieControl, "Surface is first. Might have global controls.\n");
DEBUG_TRACE (DEBUG::MackieControl, "Surface matches MasterPosition. Might have global controls.\n");
if (_mcp.device_info().has_global_controls()) {
init_controls ();
DEBUG_TRACE (DEBUG::MackieControl, "init_controls done\n");
@ -508,6 +508,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev
_jog_wheel->jog_event (delta);
return;
}
// add external (pedal?) control here
return;
}