Blocking channel selection when recording/replaying

This commit is contained in:
Klaus Schmidinger 2000-04-24 10:36:14 +02:00
parent 81531e100e
commit 1cb2f0209c
2 changed files with 10 additions and 12 deletions

View File

@ -30,4 +30,4 @@ Video Disk Recorder Revision History
- The repeat function for the remote control no longer adapts dynamically - The repeat function for the remote control no longer adapts dynamically
to the timing of the RCU (this sometimes caused the repeat function to to the timing of the RCU (this sometimes caused the repeat function to
kick in too early). kick in too early).
- Channel selection is now blocked when recording or replaying.

20
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.10 2000/04/24 09:45:03 kls Exp $ * $Id: vdr.c 1.11 2000/04/24 10:33:38 kls Exp $
*/ */
#include <signal.h> #include <signal.h>
@ -134,20 +134,18 @@ int main(int argc, char *argv[])
// Direct Channel Select (input): // Direct Channel Select (input):
case k0: case k1: case k2: case k3: case k4: case k5: case k6: case k7: case k8: case k9: case k0: case k1: case k2: case k3: case k4: case k5: case k6: case k7: case k8: case k9:
{ {
if (!DvbApi.Recording()) { if (!(DvbApi.Recording() || DvbApi.Replaying())) {
dcNumber = dcNumber * 10 + key - k0; dcNumber = dcNumber * 10 + key - k0;
dcTime = time_ms(); dcTime = time_ms();
} }
} }
// Record/Replay Control: // Record/Replay Control:
case kBegin: DvbApi.Skip(-INT_MAX); break; case kBegin: DvbApi.Skip(-INT_MAX); break;
case kRecord: if (!DvbApi.Recording()) { case kRecord: if (!(DvbApi.Recording() || DvbApi.Replaying())) {
cTimer *timer = new cTimer(true); cTimer *timer = new cTimer(true);
Timers.Add(timer); Timers.Add(timer);
Timers.Save(); Timers.Save();
} }
else
Interface.Error("Already recording!");
break; break;
case kPause: DvbApi.PauseReplay(); break; case kPause: DvbApi.PauseReplay(); break;
case kStop: DELETENULL(ReplayDisplay); case kStop: DELETENULL(ReplayDisplay);
@ -164,12 +162,12 @@ int main(int argc, char *argv[])
break; break;
// Up/Down Channel Select: // Up/Down Channel Select:
case kUp: case kUp:
case kDown: { case kDown: if (!(DvbApi.Recording() || DvbApi.Replaying())) {
int n = CurrentChannel + (key == kUp ? 1 : -1); int n = CurrentChannel + (key == kUp ? 1 : -1);
cChannel *channel = Channels.Get(n); cChannel *channel = Channels.Get(n);
if (channel) if (channel)
channel->Switch(); channel->Switch();
} }
break; break;
// Viewing Control: // Viewing Control:
case kOk: if (ReplayDisplay) case kOk: if (ReplayDisplay)