mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Implemented key macros
This commit is contained in:
18
remote.c
18
remote.c
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user