summaryrefslogtreecommitdiff
path: root/libs/surfaces/control_protocol
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaces/control_protocol')
-rw-r--r--libs/surfaces/control_protocol/basic_ui.cc3
-rw-r--r--libs/surfaces/control_protocol/control_protocol.cc10
2 files changed, 6 insertions, 7 deletions
diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc
index 71d5794805..b88e002374 100644
--- a/libs/surfaces/control_protocol/basic_ui.cc
+++ b/libs/surfaces/control_protocol/basic_ui.cc
@@ -50,10 +50,9 @@ BasicUI::~BasicUI ()
void
BasicUI::register_thread (std::string name)
{
- PBD::ThreadCreated (pthread_self(), name);
+ PBD::notify_gui_about_thread_creation (pthread_self(), name);
}
-
void
BasicUI::access_action ( std::string action_path )
{
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc
index 708373e3bc..1c9ee83833 100644
--- a/libs/surfaces/control_protocol/control_protocol.cc
+++ b/libs/surfaces/control_protocol/control_protocol.cc
@@ -70,14 +70,14 @@ ControlProtocol::next_track (uint32_t initial_id)
id++;
}
- while (id < limit) {
+ while (id <= limit) {
if ((cr = session->route_by_remote_id (id)) != 0) {
break;
}
id++;
}
- if (id == limit) {
+ if (id >= limit) {
id = 0;
while (id != initial_id) {
if ((cr = session->route_by_remote_id (id)) != 0) {
@@ -93,9 +93,9 @@ ControlProtocol::next_track (uint32_t initial_id)
void
ControlProtocol::prev_track (uint32_t initial_id)
{
- uint32_t limit = session->nroutes() - 1;
+ uint32_t limit = session->nroutes();
boost::shared_ptr<Route> cr = route_table[0];
- uint32_t id;
+ int32_t id;
if (cr) {
id = cr->remote_control_id ();
@@ -104,7 +104,7 @@ ControlProtocol::prev_track (uint32_t initial_id)
}
if (id == 0) {
- id = session->nroutes() - 1;
+ id = limit;
} else {
id--;
}