summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-12 12:20:07 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-12 12:20:07 +0200
commit00166dac5fce46cb15ec558f176d45f734f815e9 (patch)
tree7b344099f2fab0dc81792e9ce62bc15c7d3e178a /device.c
parentf8a7e51d00d66f2fd71c9f5966a893c59485584b (diff)
downloadvdr-00166dac5fce46cb15ec558f176d45f734f815e9.tar.gz
vdr-00166dac5fce46cb15ec558f176d45f734f815e9.tar.bz2
If no device with an MPEG decoder can be found at startup, the first device is now used as primary device
Diffstat (limited to 'device.c')
-rw-r--r--device.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/device.c b/device.c
index cfcf3d22..67da4571 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.38 2003/03/30 12:39:29 kls Exp $
+ * $Id: device.c 1.39 2003/04/12 11:51:04 kls Exp $
*/
#include "device.h"
@@ -106,19 +106,14 @@ bool cDevice::SetPrimaryDevice(int n)
{
n--;
if (0 <= n && n < numDevices && device[n]) {
- if (device[n]->HasDecoder()) {
- isyslog("setting primary device to %d", n + 1);
- if (primaryDevice)
- primaryDevice->MakePrimaryDevice(false);
- primaryDevice = device[n];
- primaryDevice->MakePrimaryDevice(true);
- return true;
- }
- else
- esyslog("ERROR: device number %d has no MPEG decoder", n + 1);
+ isyslog("setting primary device to %d", n + 1);
+ if (primaryDevice)
+ primaryDevice->MakePrimaryDevice(false);
+ primaryDevice = device[n];
+ primaryDevice->MakePrimaryDevice(true);
+ return true;
}
- else
- esyslog("ERROR: invalid primary device number: %d", n + 1);
+ esyslog("ERROR: invalid primary device number: %d", n + 1);
return false;
}