Update classkeys to match new total LuaSignal count (windows only)
[ardour.git] / libs / surfaces / generic_midi / midiinvokable.cc
index 42c74553d8b9a61f3d476cc5e505d83194eb33ce..f0a5e6161104ee8408bde214df83814c7c6e0b27 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2009 Paul Davis
+
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
@@ -75,7 +75,7 @@ MIDIInvokable::midi_sense_note (Parser &, EventTwoBytes *msg, bool /* is_on */)
 void
 MIDIInvokable::midi_sense_controller (Parser &, EventTwoBytes *msg)
 {
-       if (control_additional == msg->controller_number) {
+       if (control_additional == msg->controller_number && msg->value > 0x40 ) {
                execute ();
        }
 }
@@ -141,7 +141,7 @@ MIDIInvokable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
        case MIDI::on:
                _parser.channel_note_on[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_note_on, this, _1, _2));
                break;
-               
+
        case MIDI::controller:
                _parser.channel_controller[chn_i].connect_same_thread (midi_sense_connection[0], boost::bind (&MIDIInvokable::midi_sense_controller, this, _1, _2));
                break;