Make MCP MasterPosition match MIDI port number.
This commit is contained in:
parent
54ab3fb37e
commit
2a3f5d0107
@ -246,6 +246,8 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
|
|||||||
if ((prop = child->property ("value")) != 0) {
|
if ((prop = child->property ("value")) != 0) {
|
||||||
if ((_master_position = atoi (prop->value().c_str())) == 0) {
|
if ((_master_position = atoi (prop->value().c_str())) == 0) {
|
||||||
_master_position = 0;
|
_master_position = 0;
|
||||||
|
} else if (_master_position > 0) {
|
||||||
|
_master_position --;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
|
|||||||
/* lets use master_position instead */
|
/* lets use master_position instead */
|
||||||
uint32_t mp = _mcp.device_info().master_position();
|
uint32_t mp = _mcp.device_info().master_position();
|
||||||
if (_number == mp) {
|
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()) {
|
if (_mcp.device_info().has_global_controls()) {
|
||||||
init_controls ();
|
init_controls ();
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "init_controls done\n");
|
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);
|
_jog_wheel->jog_event (delta);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// add external (pedal?) control here
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user