From af2a135212088f0cba6bd8f98544b271c2f71bef Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 4 May 2003 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.30=20-=20Fixed=20minimum=20lifespan=20of?= =?UTF-8?q?=20deleted=20recordings=20(thanks=20to=20Jaakko=20Hyv=C3=A4tti)?= =?UTF-8?q?.=20-=20Updated=20French=20OSD=20texts=20(thanks=20to=20Olivier?= =?UTF-8?q?=20Jacques).=20-=20Fixed=20paging=20through=20lists=20with=20re?= =?UTF-8?q?peated=20Left/Right=20keys.=20-=20Fixed=20setting=20the=20PCR-P?= =?UTF-8?q?ID=20in=20case=20it=20is=20equal=20to=20one=20of=20the=20other?= =?UTF-8?q?=20PIDs=20(thanks=20=20=20to=20Oliver=20Endriss=20for=20reporti?= =?UTF-8?q?ng=20this=20one).=20-=20Fixed=20double=20call=20to=20MainMenuAc?= =?UTF-8?q?tion()=20of=20a=20plugin=20if=20invoked=20via=20a=20hotkey=20(t?= =?UTF-8?q?hanks=20=20=20to=20Kai=20Moeller=20for=20reporting=20this=20one?= =?UTF-8?q?).=20-=20Fixed=20handling=20dedicated=20keys.=20-=20Now=20turni?= =?UTF-8?q?ng=20off=20live=20PIDs=20when=20replaying.=20This=20avoids=20sh?= =?UTF-8?q?ort=20spikes=20from=20other=20=20=20channels=20when=20switching?= =?UTF-8?q?=20between=20Transfer=20Mode=20channels,=20and=20also=20lets=20?= =?UTF-8?q?an=20ongoing=20=20=20replay=20continue=20even=20if=20a=20record?= =?UTF-8?q?ing=20is=20started=20on=20the=20primary=20device.=20-=20The=20R?= =?UTF-8?q?CU=20channel=20display=20no=20longer=20changes=20when=20a=20rec?= =?UTF-8?q?ording=20on=20a=20different=20=20=20channel=20starts=20on=20the?= =?UTF-8?q?=20primary=20device.=20-=20Restoring=20the=20current=20channel?= =?UTF-8?q?=20in=20case=20a=20recording=20has=20switched=20the=20transpond?= =?UTF-8?q?er.=20=20=20If=20all=20devices=20are=20busy=20and=20none=20of?= =?UTF-8?q?=20them=20can=20provide=20the=20current=20channel,=20the=20=20?= =?UTF-8?q?=20message=20"Channel=20not=20available!"=20will=20be=20display?= =?UTF-8?q?ed.=20-=20Removed=20the=20(no=20longer=20necessary)=20'panic'?= =?UTF-8?q?=20stuff=20from=20cThread.=20-=20Added=20cStatus::OsdItem()=20t?= =?UTF-8?q?o=20provide=20the=20entire=20list=20of=20menu=20items=20to=20a?= =?UTF-8?q?=20plugin=20=20=20(thanks=20to=20Carsten=20Siebholz).=20-=20The?= =?UTF-8?q?=20red=20("Record")=20and=20yellow=20("Pause")=20button=20in=20?= =?UTF-8?q?the=20"Main"=20menu=20are=20no=20longer=20=20=20available=20whe?= =?UTF-8?q?n=20replaying.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- remote.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'remote.c') diff --git a/remote.c b/remote.c index 29149e9..1b73d16 100644 --- a/remote.c +++ b/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.36 2002/12/15 15:58:59 kls Exp $ + * $Id: remote.c 1.38 2003/05/02 10:49:50 kls Exp $ */ #include "remote.h" @@ -58,7 +58,7 @@ void cRemote::Clear(void) } } -bool cRemote::Put(eKeys Key) +bool cRemote::Put(eKeys Key, bool AtFront) { if (Key != kNone) { cMutexLock MutexLock(&mutex); @@ -68,9 +68,16 @@ bool cRemote::Put(eKeys Key) if (d <= 0) d = MaxKeys + d; if (d - 1 > 0) { - keys[in] = Key; - if (++in >= MaxKeys) - in = 0; + if (AtFront) { + if (--out < 0) + out = MaxKeys - 1; + keys[out] = Key; + } + else { + keys[in] = Key; + if (++in >= MaxKeys) + in = 0; + } keyPressed.Broadcast(); return true; } @@ -123,6 +130,11 @@ bool cRemote::Put(const char *Code, bool Repeat, bool Release) return false; } +bool cRemote::HasKeys(void) +{ + return in != out && !(keys[out] & k_Repeat); +} + eKeys cRemote::Get(int WaitMs, char **UnknownCode) { for (;;) { -- cgit v1.2.3