mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Enhacements to cKbdRemote
This commit is contained in:
parent
c7849b14a7
commit
831d7b8524
5
remote.c
5
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.35 2002/12/15 10:09:27 kls Exp $
|
* $Id: remote.c 1.36 2002/12/15 15:58:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -180,6 +180,7 @@ static tKbdMap KbdMap[] = {
|
|||||||
{ kfNone, 0x0000000000000000ULL }
|
{ kfNone, 0x0000000000000000ULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool cKbdRemote::kbdAvailable = false;
|
||||||
bool cKbdRemote::rawMode = false;
|
bool cKbdRemote::rawMode = false;
|
||||||
|
|
||||||
cKbdRemote::cKbdRemote(void)
|
cKbdRemote::cKbdRemote(void)
|
||||||
@ -195,11 +196,13 @@ cKbdRemote::cKbdRemote(void)
|
|||||||
tm.c_cc[VTIME] = 0;
|
tm.c_cc[VTIME] = 0;
|
||||||
tcsetattr(STDIN_FILENO, TCSANOW, &tm);
|
tcsetattr(STDIN_FILENO, TCSANOW, &tm);
|
||||||
}
|
}
|
||||||
|
kbdAvailable = true;
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
cKbdRemote::~cKbdRemote()
|
cKbdRemote::~cKbdRemote()
|
||||||
{
|
{
|
||||||
|
kbdAvailable = false;
|
||||||
active = false;
|
active = false;
|
||||||
Cancel(3);
|
Cancel(3);
|
||||||
tcsetattr(STDIN_FILENO, TCSANOW, &savedTm);
|
tcsetattr(STDIN_FILENO, TCSANOW, &savedTm);
|
||||||
|
6
remote.h
6
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.23 2002/12/15 09:58:32 kls Exp $
|
* $Id: remote.h 1.24 2002/12/15 15:49:06 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __REMOTE_H
|
#ifndef __REMOTE_H
|
||||||
@ -80,6 +80,7 @@ enum eKbdFunc {
|
|||||||
class cKbdRemote : public cRemote, private cThread {
|
class cKbdRemote : public cRemote, private cThread {
|
||||||
private:
|
private:
|
||||||
bool active;
|
bool active;
|
||||||
|
static bool kbdAvailable;
|
||||||
static bool rawMode;
|
static bool rawMode;
|
||||||
struct termios savedTm;
|
struct termios savedTm;
|
||||||
virtual void Action(void);
|
virtual void Action(void);
|
||||||
@ -87,7 +88,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
cKbdRemote(void);
|
cKbdRemote(void);
|
||||||
virtual ~cKbdRemote();
|
virtual ~cKbdRemote();
|
||||||
uint64 MapFuncToCode(int Func);
|
static bool KbdAvailable(void) { return kbdAvailable; }
|
||||||
|
static uint64 MapFuncToCode(int Func);
|
||||||
static void SetRawMode(bool RawMode);
|
static void SetRawMode(bool RawMode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user