mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
cRemote::PutMacro() now sets a lock while it expands the macro
This commit is contained in:
parent
93d2941ebe
commit
3a9deab56c
@ -1831,6 +1831,7 @@ Petri Hintukainen <Petri.Hintukainen@hut.fi>
|
|||||||
in a key macro
|
in a key macro
|
||||||
for pointing out that keys from expanded key macros should be put into the front of
|
for pointing out that keys from expanded key macros should be put into the front of
|
||||||
the key queue to avoid problems if the queue is not empty at that time
|
the key queue to avoid problems if the queue is not empty at that time
|
||||||
|
for making cRemote::PutMacro() set a lock while it expands the macro
|
||||||
|
|
||||||
Marcel Schaeben <mts280@gmx.de>
|
Marcel Schaeben <mts280@gmx.de>
|
||||||
for his "Easy Input" patch
|
for his "Easy Input" patch
|
||||||
|
2
HISTORY
2
HISTORY
@ -4964,3 +4964,5 @@ Video Disk Recorder Revision History
|
|||||||
avoid problems if the queue is not empty at that time (based on a patch from
|
avoid problems if the queue is not empty at that time (based on a patch from
|
||||||
Petri Hintukainen).
|
Petri Hintukainen).
|
||||||
- cKeyMacro now has an explicit counter for the number of keys it contains.
|
- cKeyMacro now has an explicit counter for the number of keys it contains.
|
||||||
|
- cRemote::PutMacro() now sets a lock while it expands the macro (thanks to
|
||||||
|
Petri Hintukainen).
|
||||||
|
3
remote.c
3
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.52 2006/10/14 10:24:13 kls Exp $
|
* $Id: remote.c 1.53 2006/10/14 10:44:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -106,6 +106,7 @@ bool cRemote::PutMacro(eKeys Key)
|
|||||||
const cKeyMacro *km = KeyMacros.Get(Key);
|
const cKeyMacro *km = KeyMacros.Get(Key);
|
||||||
if (km) {
|
if (km) {
|
||||||
plugin = km->Plugin();
|
plugin = km->Plugin();
|
||||||
|
cMutexLock MutexLock(&mutex);
|
||||||
for (int i = km->NumKeys(); --i > 0; ) {
|
for (int i = km->NumKeys(); --i > 0; ) {
|
||||||
if (!Put(km->Macro()[i], true))
|
if (!Put(km->Macro()[i], true))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user