Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Fix for vdr bug: repeat does not work with LIRC remote controls.
Sorry I fixed this so late.
I changed to a new remote control and to the new vdr
version that had broken LIRC repeat code at the same time.
So I assumed my new remote control did not have autorepeat.
But it does.
With the attached patch, vdr 0.7 also supports it. ;-)
I wonder why nobody else reported this to Klaus or to me.
Is nobody using vdr with LIRC?
Carsten.
-- Attached file included as plaintext by Listar --
-- File: repeat.patch
--- VDR/remote.c Sun Feb 4 17:26:12 2001
+++ /wald/home/cko/linux/VDR/remote.c Sun Feb 4 17:26:00 2001
@@ -428,6 +428,7 @@
dsyslog(LOG_INFO, "LIRC remote control thread started (pid=%d)", getpid());
int FirstTime = 0;
+ int LastTime = 0;
char buf[LIRC_BUFFER_SIZE];
char LastKeyName[LIRC_KEY_BUF];
@@ -451,14 +452,17 @@
continue; // repeat function kicks in after a short delay
receivedData = receivedRepeat = true;
}
+ LastTime = Now;
WakeUp();
}
}
else if (receivedData) { // the last data before releasing the key hasn't been fetched yet
if (receivedRepeat) { // it was a repeat, so let's make it a release
- receivedRepeat = false;
- receivedRelease = true;
- WakeUp();
+ if (time_ms() - LastTime > REPEATDELAY) {
+ receivedRepeat = false;
+ receivedRelease = true;
+ WakeUp();
+ }
}
}
else if (receivedRepeat) { // all data has already been fetched, but the last one was a repeat, so let's generate a release
---
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index