mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling repeat function with LIRC
This commit is contained in:
parent
2a7dd5e67d
commit
c30aeec716
@ -575,3 +575,4 @@ Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
|
|||||||
|
|
||||||
Ludwig Nussel <ludwig.nussel@web.de>
|
Ludwig Nussel <ludwig.nussel@web.de>
|
||||||
for making the LIRC thread avoid high CPU load in case the connection to LIRC gets lost
|
for making the LIRC thread avoid high CPU load in case the connection to LIRC gets lost
|
||||||
|
for fixing handling repeat function with LIRC
|
||||||
|
1
HISTORY
1
HISTORY
@ -2014,3 +2014,4 @@ Video Disk Recorder Revision History
|
|||||||
(thanks to Gerhard Steiner for reporting this one).
|
(thanks to Gerhard Steiner for reporting this one).
|
||||||
- Avoiding high CPU load in case the connection to LIRC gets lost (thanks to
|
- Avoiding high CPU load in case the connection to LIRC gets lost (thanks to
|
||||||
Ludwig Nussel).
|
Ludwig Nussel).
|
||||||
|
- Fixed handling repeat function with LIRC (thanks to Ludwig Nussel).
|
||||||
|
6
lirc.c
6
lirc.c
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
|
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
|
||||||
*
|
*
|
||||||
* $Id: lirc.c 1.2 2003/04/06 15:39:48 kls Exp $
|
* $Id: lirc.c 1.3 2003/04/06 15:45:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lirc.h"
|
#include "lirc.h"
|
||||||
@ -71,6 +71,8 @@ void cLircRemote::Action(void)
|
|||||||
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
|
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
|
||||||
int Now = time_ms();
|
int Now = time_ms();
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
|
if (repeat)
|
||||||
|
Put(LastKeyName, false, true);
|
||||||
strcpy(LastKeyName, KeyName);
|
strcpy(LastKeyName, KeyName);
|
||||||
repeat = false;
|
repeat = false;
|
||||||
FirstTime = Now;
|
FirstTime = Now;
|
||||||
@ -86,7 +88,7 @@ void cLircRemote::Action(void)
|
|||||||
Put(KeyName, repeat);
|
Put(KeyName, repeat);
|
||||||
}
|
}
|
||||||
else if (repeat) { // the last one was a repeat, so let's generate a release
|
else if (repeat) { // the last one was a repeat, so let's generate a release
|
||||||
if (time_ms() - LastTime > REPEATDELAY) {
|
if (time_ms() - LastTime >= REPEATDELAY) {
|
||||||
Put(LastKeyName, false, true);
|
Put(LastKeyName, false, true);
|
||||||
repeat = false;
|
repeat = false;
|
||||||
*LastKeyName = 0;
|
*LastKeyName = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user