mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented a default cRemote::Initialize()
This commit is contained in:
parent
eb13b8eadd
commit
d63e99d8ef
@ -479,6 +479,7 @@ Helmut Auer <vdr@helmutauer.de>
|
|||||||
for suggesting to make the "Zap timeout" a setup variable
|
for suggesting to make the "Zap timeout" a setup variable
|
||||||
for fixing a frequency/transponder handling mixup when setting the time from the
|
for fixing a frequency/transponder handling mixup when setting the time from the
|
||||||
DVB data stream
|
DVB data stream
|
||||||
|
for implementing a default cRemote::Initialize()
|
||||||
|
|
||||||
Jeremy Hall <jhall@UU.NET>
|
Jeremy Hall <jhall@UU.NET>
|
||||||
for fixing an incomplete initialization of the filter parameters in eit.c
|
for fixing an incomplete initialization of the filter parameters in eit.c
|
||||||
|
6
HISTORY
6
HISTORY
@ -2837,5 +2837,11 @@ Video Disk Recorder Revision History
|
|||||||
Oliver Endriss for reporting this one).
|
Oliver Endriss for reporting this one).
|
||||||
- Added some missing cStatus::MsgOsdTextItem() calls (thanks to Oliver Endriss for
|
- Added some missing cStatus::MsgOsdTextItem() calls (thanks to Oliver Endriss for
|
||||||
reporting this one).
|
reporting this one).
|
||||||
|
|
||||||
|
2004-05-28: Version 1.3.9
|
||||||
|
|
||||||
- Completed Croatian language texts (thanks to Drazen Dupor).
|
- Completed Croatian language texts (thanks to Drazen Dupor).
|
||||||
- New iso8859-2 font to fix the problem with program freezes (thanks to Drazen Dupor).
|
- New iso8859-2 font to fix the problem with program freezes (thanks to Drazen Dupor).
|
||||||
|
- Implemented a default cRemote::Initialize() that waits 10 seconds for a keypress
|
||||||
|
in order to prevent a "hangup" in case, e.g., the LIRC driver is not loaded (thanks
|
||||||
|
to Helmut Auer).
|
||||||
|
15
remote.c
15
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.39 2003/10/18 11:35:32 kls Exp $
|
* $Id: remote.c 1.40 2004/05/28 14:19:52 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
// --- cRemote ---------------------------------------------------------------
|
// --- cRemote ---------------------------------------------------------------
|
||||||
|
|
||||||
|
#define INITTIMEOUT 10000 // 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;
|
||||||
@ -48,6 +50,17 @@ void cRemote::PutSetup(const char *Setup)
|
|||||||
Keys.PutSetup(Name(), Setup);
|
Keys.PutSetup(Name(), Setup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cRemote::Initialize(void)
|
||||||
|
{
|
||||||
|
if (Ready()) {
|
||||||
|
char *NewCode = NULL;
|
||||||
|
eKeys Key = Get(INITTIMEOUT, &NewCode);
|
||||||
|
if (Key != kNone || NewCode)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void cRemote::Clear(void)
|
void cRemote::Clear(void)
|
||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutex);
|
cMutexLock MutexLock(&mutex);
|
||||||
|
4
remote.h
4
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.28 2003/05/02 10:41:35 kls Exp $
|
* $Id: remote.h 1.29 2004/05/28 14:14:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __REMOTE_H
|
#ifndef __REMOTE_H
|
||||||
@ -38,7 +38,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual ~cRemote();
|
virtual ~cRemote();
|
||||||
virtual bool Ready(void) { return true; }
|
virtual bool Ready(void) { return true; }
|
||||||
virtual bool Initialize(void) { return true; }
|
virtual bool Initialize(void);
|
||||||
const char *Name(void) { return name; }
|
const char *Name(void) { return name; }
|
||||||
static void SetLearning(cRemote *Learning) { learning = Learning; }
|
static void SetLearning(cRemote *Learning) { learning = Learning; }
|
||||||
static void Clear(void);
|
static void Clear(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user