Implemented key macros

This commit is contained in:
Klaus Schmidinger
2002-10-27 15:46:30 +01:00
parent 74c74fb5d2
commit 64fd9c4a1b
9 changed files with 137 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: remote.c 1.29 2002/10/12 15:22:08 kls Exp $
* $Id: remote.c 1.30 2002/10/27 15:15:58 kls Exp $
*/
#include "remote.h"
@@ -84,6 +84,22 @@ bool cRemote::Put(eKeys Key)
return true; // only a real key shall report an overflow!
}
bool cRemote::PutMacro(eKeys Key)
{
const cKeyMacro *km = KeyMacros.Get(Key);
if (km) {
for (int i = 1; i < MAXKEYSINMACRO; i++) {
if (km->Macro()[i] != kNone) {
if (!Put(km->Macro()[i]))
return false;
}
else
break;
}
}
return true;
}
bool cRemote::Put(uint64 Code, bool Repeat, bool Release)
{
char buffer[32];