for (uint32_t n = 0; n < 1 + _device_info.extenders(); ++n) {
bool is_master = false;
- if (_device_info.master_position() == 0) {
- /* unspecified master position, use first surface */
- if (n == 0) {
- is_master = true;
- if (_device_info.extenders() == 0) {
- device_name = _device_info.name();
- } else {
- device_name = X_("mackie control");
- }
- }
- } else if ((n+1) == _device_info.master_position()) {
- /* specified master position, uses 1-based counting for user interaction */
+ if (n == _device_info.master_position()) {
is_master = true;
if (_device_info.extenders() == 0) {
device_name = _device_info.name();
if (!is_master) {
device_name = string_compose (X_("mackie control ext %1"), n+1);
}
+ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Port Name for surface %1 is %2\n", n, device_name));
boost::shared_ptr<Surface> surface;
- if (n == _device_info.master_position()) {
+ if (is_master) {
stype = mcu;
} else {
stype = ext;
string out_name;
if (_surface->mcp().device_info().extenders() > 0) {
- if (_surface->number() + 1 == _surface->mcp().device_info().master_position()) {
+ if (_surface->number() == _surface->mcp().device_info().master_position()) {
in_name = X_("mackie control in");
out_name = X_("mackie control out");
} else {
- in_name = string_compose (X_("mackie control in ext %1"), _surface->number());
- out_name = string_compose (X_("mackie control out ext %1"), _surface->number());
+ in_name = string_compose (X_("mackie control in ext %1"), (_surface->number() + 1));
+ out_name = string_compose (X_("mackie control out ext %1"), _surface->number() + 1);
}
} else {
in_name = X_("mackie control in");