diff options
author | nox <nox@FreeBSD.org> | 2011-07-17 17:22:40 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2011-07-17 17:22:40 +0800 |
commit | 8b8f276ff26595b9ab2cd7fb0567aa727aab99f1 (patch) | |
tree | 4559eed2a4c6016f9e0782c5a1aaf1edc13c0179 /comms | |
parent | df653e3e3845243be89a0894aaa2c97d8e97eedb (diff) | |
download | freebsd-ports-gnome-8b8f276ff26595b9ab2cd7fb0567aa727aab99f1.tar.gz freebsd-ports-gnome-8b8f276ff26595b9ab2cd7fb0567aa727aab99f1.tar.zst freebsd-ports-gnome-8b8f276ff26595b9ab2cd7fb0567aa727aab99f1.zip |
- Update devinput repeat hack to improve af9015 tuner remote behaviour.
- Bump PORTREVISION.
Diffstat (limited to 'comms')
-rw-r--r-- | comms/lirc/Makefile | 2 | ||||
-rw-r--r-- | comms/lirc/files/patch-daemons::hw_devinput.c | 25 |
2 files changed, 21 insertions, 6 deletions
diff --git a/comms/lirc/Makefile b/comms/lirc/Makefile index ed3b1c323106..353e5908ddb6 100644 --- a/comms/lirc/Makefile +++ b/comms/lirc/Makefile @@ -7,7 +7,7 @@ PORTNAME= lirc PORTVERSION= 0.9.0 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= comms MASTER_SITES= SF/${PORTNAME}/LIRC/${PORTVERSION} diff --git a/comms/lirc/files/patch-daemons::hw_devinput.c b/comms/lirc/files/patch-daemons::hw_devinput.c index f87dcd3891e1..a026d30dfa68 100644 --- a/comms/lirc/files/patch-daemons::hw_devinput.c +++ b/comms/lirc/files/patch-daemons::hw_devinput.c @@ -16,7 +16,7 @@ int rd; ir_code value; -@@ -399,6 +405,23 @@ char *devinput_rec(struct ir_remote *rem +@@ -399,6 +405,38 @@ char *devinput_rec(struct ir_remote *rem LOGPRINTF(1, "time %ld.%06ld type %d code %d value %d", event.time.tv_sec, event.time.tv_usec, event.type, event.code, event.value); @@ -28,11 +28,26 @@ + if (scancodeevent.type == EV_MSC && + event.value == scancodeevent.value) { + if (rptevent.type == EV_KEY && rptevent.value != 0) { ++ struct timeval difft; ++ ++ difft = event.time; ++ difft.tv_sec -= scancodeevent.time.tv_sec; ++ difft.tv_usec -= scancodeevent.time.tv_usec; ++ if (difft.tv_usec < 0) { ++ difft.tv_sec--; ++ difft.tv_usec += 1000000; ++ } ++ scancodeevent = event; + event = rptevent; -+ event.value = 2; -+ repeat_state = RPT_YES; ++ if (difft.tv_sec == 0) { ++ event.value = 2; ++ repeat_state = RPT_YES; ++ } else { ++ event.value = 1; ++ repeat_state = RPT_NO; ++ } + } -+ } else if (rptevent.type == EV_KEY && rptevent.value == 0) { ++ } else if (rptevent.type == EV_KEY && rptevent.value <= 1) { + scancodeevent = event; + } + } @@ -40,7 +55,7 @@ value = (unsigned)event.value; #ifdef EV_SW if (value == 2 && (event.type == EV_KEY || event.type == EV_SW)) { -@@ -418,6 +441,9 @@ char *devinput_rec(struct ir_remote *rem +@@ -418,6 +456,9 @@ char *devinput_rec(struct ir_remote *rem if (event.value == 2) { repeat_state = RPT_YES; } else { |