mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented a timeout for remote controls that don't deliver "repeat" keypresses very fast
This commit is contained in:
parent
251e04d25a
commit
1a4526a3df
@ -1347,7 +1347,7 @@ Udo Richter <udo_richter@gmx.de>
|
|||||||
no longer exists
|
no longer exists
|
||||||
for reporting a missing check against MAXOSDAREAS in cOsd::CanHandleAreas()
|
for reporting a missing check against MAXOSDAREAS in cOsd::CanHandleAreas()
|
||||||
for making the Makefile report a summary of failed plugins
|
for making the Makefile report a summary of failed plugins
|
||||||
for reporting a problem with the new handling of k_Repeat keypresses in channel
|
for reporting a problem with the new handling of k_Repeat keypresses in channel
|
||||||
switching
|
switching
|
||||||
|
|
||||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||||
@ -1465,6 +1465,8 @@ Luca Olivetti <luca@ventoso.org>
|
|||||||
for making cDevice::AttachPlayer() keep the track language codes and descriptions
|
for making cDevice::AttachPlayer() keep the track language codes and descriptions
|
||||||
in Transfer Mode
|
in Transfer Mode
|
||||||
for suggesting to make the "Menu" key behave consistently
|
for suggesting to make the "Menu" key behave consistently
|
||||||
|
for suggesting to implement a timeout for remote controls that don't deliver
|
||||||
|
"repeat" keypresses very fast
|
||||||
|
|
||||||
Mikko Salo <mikko.salo@ppe.inet.fi>
|
Mikko Salo <mikko.salo@ppe.inet.fi>
|
||||||
for suggesting to make the setup option "DVB/Video display format" available only
|
for suggesting to make the setup option "DVB/Video display format" available only
|
||||||
|
6
HISTORY
6
HISTORY
@ -4248,9 +4248,6 @@ Video Disk Recorder Revision History
|
|||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
- Fixed channel switching with the Down (Up) key in case the current channel is
|
- Fixed channel switching with the Down (Up) key in case the current channel is
|
||||||
already the first (last) in the list (reported by Frank Krömmelbein).
|
already the first (last) in the list (reported by Frank Krömmelbein).
|
||||||
- Increased the timeout in cInterface::GetKey() to avoid problems with remote
|
|
||||||
controls that don't deliver "repeat" keypresses very fast (problem with the new
|
|
||||||
handling of k_Repeat keypresses in channel switching reported by Udo Richter).
|
|
||||||
- Removed the "buffer reserve" in Transfer Mode - it's no longer necessary with
|
- Removed the "buffer reserve" in Transfer Mode - it's no longer necessary with
|
||||||
recent driver/firmware versions.
|
recent driver/firmware versions.
|
||||||
- The epg.data file is now written when VDR exits (suggested by Daniel Karsubka).
|
- The epg.data file is now written when VDR exits (suggested by Daniel Karsubka).
|
||||||
@ -4263,3 +4260,6 @@ Video Disk Recorder Revision History
|
|||||||
- When reading epg.data (or data from PUTE), the version number of events with
|
- When reading epg.data (or data from PUTE), the version number of events with
|
||||||
table IDs smaller than 0x50 is now ignored because otherwise the current
|
table IDs smaller than 0x50 is now ignored because otherwise the current
|
||||||
running status would not be set after a restart of VDR.
|
running status would not be set after a restart of VDR.
|
||||||
|
- Implemented a timeout for remote controls that don't deliver "repeat" keypresses
|
||||||
|
very fast (based on a suggestion by Luca Olivetti; problem with the new handling
|
||||||
|
of k_Repeat keypresses in channel switching reported by Udo Richter).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: interface.c 1.72 2006/01/28 12:44:34 kls Exp $
|
* $Id: interface.c 1.73 2006/01/29 12:35:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
@ -37,7 +37,7 @@ eKeys cInterface::GetKey(bool Wait)
|
|||||||
if (SVDRP->Process())
|
if (SVDRP->Process())
|
||||||
Wait = false;
|
Wait = false;
|
||||||
}
|
}
|
||||||
return cRemote::Get(Wait ? 1000 : 100);
|
return cRemote::Get(Wait ? 1000 : 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
eKeys cInterface::Wait(int Seconds, bool KeepChar)
|
eKeys cInterface::Wait(int Seconds, bool KeepChar)
|
||||||
|
10
remote.c
10
remote.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remote.c 1.48 2006/01/15 15:00:00 kls Exp $
|
* $Id: remote.c 1.49 2006/01/29 12:27:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -18,11 +18,13 @@
|
|||||||
|
|
||||||
// --- cRemote ---------------------------------------------------------------
|
// --- cRemote ---------------------------------------------------------------
|
||||||
|
|
||||||
#define INITTIMEOUT 10000 // ms
|
#define INITTIMEOUT 10000 // ms
|
||||||
|
#define REPEATTIMEOUT 1000 // ms
|
||||||
|
|
||||||
eKeys cRemote::keys[MaxKeys];
|
eKeys cRemote::keys[MaxKeys];
|
||||||
int cRemote::in = 0;
|
int cRemote::in = 0;
|
||||||
int cRemote::out = 0;
|
int cRemote::out = 0;
|
||||||
|
cTimeMs cRemote::repeatTimeout;
|
||||||
cRemote *cRemote::learning = NULL;
|
cRemote *cRemote::learning = NULL;
|
||||||
char *cRemote::unknownCode = NULL;
|
char *cRemote::unknownCode = NULL;
|
||||||
cMutex cRemote::mutex;
|
cMutex cRemote::mutex;
|
||||||
@ -163,9 +165,11 @@ eKeys cRemote::Get(int WaitMs, char **UnknownCode)
|
|||||||
eKeys k = keys[out];
|
eKeys k = keys[out];
|
||||||
if (++out >= MaxKeys)
|
if (++out >= MaxKeys)
|
||||||
out = 0;
|
out = 0;
|
||||||
|
if ((k & k_Repeat) != 0)
|
||||||
|
repeatTimeout.Set(REPEATTIMEOUT);
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs)) {
|
else if (!WaitMs || !keyPressed.TimedWait(mutex, WaitMs) && repeatTimeout.TimedOut()) {
|
||||||
if (learning && UnknownCode) {
|
if (learning && UnknownCode) {
|
||||||
*UnknownCode = unknownCode;
|
*UnknownCode = unknownCode;
|
||||||
unknownCode = NULL;
|
unknownCode = NULL;
|
||||||
|
3
remote.h
3
remote.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remote.h 1.32 2006/01/01 14:00:50 kls Exp $
|
* $Id: remote.h 1.33 2006/01/29 12:27:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __REMOTE_H
|
#ifndef __REMOTE_H
|
||||||
@ -23,6 +23,7 @@ private:
|
|||||||
static eKeys keys[MaxKeys];
|
static eKeys keys[MaxKeys];
|
||||||
static int in;
|
static int in;
|
||||||
static int out;
|
static int out;
|
||||||
|
static cTimeMs repeatTimeout;
|
||||||
static cRemote *learning;
|
static cRemote *learning;
|
||||||
static char *unknownCode;
|
static char *unknownCode;
|
||||||
static cMutex mutex;
|
static cMutex mutex;
|
||||||
|
Loading…
Reference in New Issue
Block a user