summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2015-10-11 21:37:04 -0700
committerLen Ovens <len@ovenwerks.net>2015-10-11 21:37:04 -0700
commit104f43ad37e7fd6cfc5d273d1ec2cec003c29265 (patch)
tree03b97171057db93b5d96d7303779eb49ac7e7ce5
parent27f57cde9ad5782dfb2a16fa0520d67b9e5ed4d4 (diff)
Fix MCP extension number and get master on right surface.
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc16
-rw-r--r--libs/surfaces/mackie/surface_port.cc6
2 files changed, 6 insertions, 16 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 6f81b57c59..9f9f33b633 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -775,18 +775,7 @@ MackieControlProtocol::create_surfaces ()
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();
@@ -799,10 +788,11 @@ MackieControlProtocol::create_surfaces ()
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;
diff --git a/libs/surfaces/mackie/surface_port.cc b/libs/surfaces/mackie/surface_port.cc
index 6f243a5444..009f45d136 100644
--- a/libs/surfaces/mackie/surface_port.cc
+++ b/libs/surfaces/mackie/surface_port.cc
@@ -62,12 +62,12 @@ SurfacePort::SurfacePort (Surface& s)
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");