diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-03-09 14:10:12 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-03-09 14:10:12 +0100 |
commit | 8d4d7f2b626226a543e09651772d43e7313ebbf5 (patch) | |
tree | 0c9025e440752e3053aed99dda8c20d3d5c7df75 /vdr.c | |
parent | dfc60da1d5fb03c6007e66df16f5979080171a4b (diff) | |
download | vdr-8d4d7f2b626226a543e09651772d43e7313ebbf5.tar.gz vdr-8d4d7f2b626226a543e09651772d43e7313ebbf5.tar.bz2 |
Trying harder to find a primary device
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.145 2003/02/16 10:34:24 kls Exp $ + * $Id: vdr.c 1.146 2003/03/09 14:07:46 kls Exp $ */ #include <getopt.h> @@ -365,6 +365,16 @@ int main(int argc, char *argv[]) cDevice::SetPrimaryDevice(Setup.PrimaryDVB); if (!cDevice::PrimaryDevice()) { + for (int i = 0; i < cDevice::NumDevices(); i++) { + cDevice *d = cDevice::GetDevice(i); + if (d && d->HasDecoder()) { + isyslog("trying device number %d instead", i + 1); + if (cDevice::SetPrimaryDevice(i + 1)) + Setup.PrimaryDVB = i + 1; + } + } + } + if (!cDevice::PrimaryDevice()) { const char *msg = "no primary device found - giving up!"; fprintf(stderr, "vdr: %s\n", msg); esyslog("ERROR: %s", msg); |