mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()
This commit is contained in:
14
remote.c
14
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.46 2006/01/01 14:21:07 kls Exp $
|
||||
* $Id: remote.c 1.47 2006/01/08 17:13:18 kls Exp $
|
||||
*/
|
||||
|
||||
#include "remote.h"
|
||||
@@ -301,12 +301,12 @@ uint64 cKbdRemote::ReadKeySequence(void)
|
||||
k |= key1 & 0xFF;
|
||||
switch (key1) {
|
||||
case 0x31 ... 0x3F: // more-byte sequence
|
||||
while (key1 != 0x7E) {
|
||||
k <<= 8;
|
||||
k |= key1 & 0xFF;
|
||||
if ((key1 = ReadKey()) < 0)
|
||||
break; // Sequence ends here
|
||||
}
|
||||
do {
|
||||
if ((key1 = ReadKey()) < 0)
|
||||
break; // Sequence ends here
|
||||
k <<= 8;
|
||||
k |= key1 & 0xFF;
|
||||
} while (key1 != 0x7E);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user