MCP: look for jog wheel as a special case

git-svn-id: svn://localhost/ardour2/branches/3.0@11839 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2012-04-08 21:22:21 +00:00
parent 79799023f5
commit 2cf34cdebd
3 changed files with 6 additions and 0 deletions

View File

@@ -289,6 +289,7 @@ Jog::factory (Surface& surface, int id, int ordinal, const char* name, Group& gr
{
Jog* j = new Jog (id, ordinal, name, group);
surface.controls.push_back (j);
surface.controls_by_name["jog"] = j;
group.add (*j);
return j;
}

View File

@@ -156,6 +156,7 @@ public:
enum base_id_t {
fader_base_id = 0x0,
pot_base_id = 0x10,
jog_base_id = 0x3c,
fader_touch_button_base_id = 0x68,
vselect_button_base_id = 0x20,
select_button_base_id = 0x18,

View File

@@ -368,6 +368,10 @@ MackiePort::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes*
Control* control = _mcp.surface().pots[(8*number()) + ev->controller_number];
if (!control && ev->controller_number == Control::jog_base_id) {
control = _mcp.surface().controls_by_name["jog"];
}
if (control) {
ControlState state;