aboutsummaryrefslogtreecommitdiff
path: root/comms/lirc
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2011-07-17 09:22:40 +0000
committerJuergen Lock <nox@FreeBSD.org>2011-07-17 09:22:40 +0000
commitdbc9d49ce201a52ee6c47038680825b48177b90c (patch)
tree8151c66840d8696ba828a6b5cd3aa5ede9acdab6 /comms/lirc
parent79c950234b376a79346c5cd16e2862a18e0eec62 (diff)
downloadports-dbc9d49ce201a52ee6c47038680825b48177b90c.tar.gz
ports-dbc9d49ce201a52ee6c47038680825b48177b90c.zip
Notes
Diffstat (limited to 'comms/lirc')
-rw-r--r--comms/lirc/Makefile2
-rw-r--r--comms/lirc/files/patch-daemons::hw_devinput.c25
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 {