1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()

This commit is contained in:
Klaus Schmidinger 2006-01-08 17:17:20 +01:00
parent 227034f8e6
commit df65f4a2f1
3 changed files with 12 additions and 7 deletions

View File

@ -943,6 +943,7 @@ Peter Bieringer <pb@bieringer.de>
for suggesting to implement the command line option '--vfat' for suggesting to implement the command line option '--vfat'
for reporting a leftover 'summary.vdr' in vdr.5 for reporting a leftover 'summary.vdr' in vdr.5
for adding more error messages and line numbers when reading EPG data and info.vdr for adding more error messages and line numbers when reading EPG data and info.vdr
for fixing handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()
Alexander Damhuis <ad@phonedation.de> Alexander Damhuis <ad@phonedation.de>
for reporting problems when deleting a timer that is currently recording for reporting problems when deleting a timer that is currently recording

View File

@ -4143,3 +4143,7 @@ Video Disk Recorder Revision History
- Added a missing #include <linux/unistd.h> to thread.c (thanks to Ville Skyttä). - Added a missing #include <linux/unistd.h> to thread.c (thanks to Ville Skyttä).
- Fixed the "plugins-clean" and "plugins-install" targets in the Makefile (thanks - Fixed the "plugins-clean" and "plugins-install" targets in the Makefile (thanks
to Andreas Brachold). to Andreas Brachold).
- Fixed handling "more than 3 byte" key sequences in cKbdRemote::ReadKeySequence()
(thanks to Peter Bieringer). If you are using the PC keyboard as remote control
input you may need to make VDR newly learn the keys by removing the remote.conf
file.

View File

@ -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.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" #include "remote.h"
@ -301,12 +301,12 @@ uint64 cKbdRemote::ReadKeySequence(void)
k |= key1 & 0xFF; k |= key1 & 0xFF;
switch (key1) { switch (key1) {
case 0x31 ... 0x3F: // more-byte sequence case 0x31 ... 0x3F: // more-byte sequence
while (key1 != 0x7E) { do {
k <<= 8; if ((key1 = ReadKey()) < 0)
k |= key1 & 0xFF; break; // Sequence ends here
if ((key1 = ReadKey()) < 0) k <<= 8;
break; // Sequence ends here k |= key1 & 0xFF;
} } while (key1 != 0x7E);
break; break;
} }
} }