summaryrefslogtreecommitdiff
path: root/libs/surfaces/faderport/faderport.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-12-01 09:23:02 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-12-01 09:23:08 -0500
commitdaf02e8c73e98b5ef265825024eb5d6fbbecbcc9 (patch)
tree858ea7d5f480b63e2670d776edb67c6bb1db2eb5 /libs/surfaces/faderport/faderport.cc
parent3b4df61d83909fd8015407efe791a80d0893f3b7 (diff)
remove "medium-length" press concept from faderport code and GUI
Diffstat (limited to 'libs/surfaces/faderport/faderport.cc')
-rw-r--r--libs/surfaces/faderport/faderport.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc
index 19dbfe83ce..5a0b0edb0b 100644
--- a/libs/surfaces/faderport/faderport.cc
+++ b/libs/surfaces/faderport/faderport.cc
@@ -714,9 +714,7 @@ void
FaderPort::Button::invoke (FaderPort::ButtonState bs, bool press)
{
if (!press) {
- if (long_press == 1) {
- bs = FaderPort::ButtonState (bs | LongishPress);
- } else if (long_press == 2) {
+ if (long_press) {
bs = FaderPort::ButtonState (bs | LongPress);
}
}
@@ -753,16 +751,14 @@ FaderPort::Button::do_timing (bool press)
{
if (press) {
pressed_at = get_microseconds ();
- long_press = 0;
+ long_press = false;
} else {
if (pressed_at > 0) {
const ARDOUR::microseconds_t delta = ARDOUR::get_microseconds () - pressed_at;
- if (delta < 500000) {
- long_press = 0;
- } else if (delta < 1000000) {
- long_press = 1;
+ if (delta < 1000000) {
+ long_press = false;
} else {
- long_press = 2;
+ long_press = true;
}
pressed_at = 0;
}
@@ -873,7 +869,6 @@ FaderPort::Button::set_state (XMLNode const& node)
state_pairs.push_back (make_pair (string ("plain"), ButtonState (0)));
state_pairs.push_back (make_pair (string ("shift"), ShiftDown));
- state_pairs.push_back (make_pair (string ("longish"), LongishPress));
state_pairs.push_back (make_pair (string ("long"), LongPress));
on_press.clear ();
@@ -914,7 +909,6 @@ FaderPort::Button::get_state () const
state_pairs.push_back (make_pair (string ("plain"), ButtonState (0)));
state_pairs.push_back (make_pair (string ("shift"), ShiftDown));
- state_pairs.push_back (make_pair (string ("longish"), LongishPress));
state_pairs.push_back (make_pair (string ("long"), LongPress));
for (vector<state_pair_t>::const_iterator sp = state_pairs.begin(); sp != state_pairs.end(); ++sp) {