diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-07 16:21:46 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-10-07 16:21:46 +0200 |
commit | 10a7cf33d67b138a31df0564e3fc9267beafe366 (patch) | |
tree | f3f0e9a259da1f9a85680554c599eb4404aefff4 /device.c | |
parent | 186ee74748ccbd2e917026fc71988f8bdd70d2ef (diff) | |
download | vdr-10a7cf33d67b138a31df0564e3fc9267beafe366.tar.gz vdr-10a7cf33d67b138a31df0564e3fc9267beafe366.tar.bz2 |
Added cDevice::DeviceNumber()
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.25 2002/10/06 13:49:38 kls Exp $ + * $Id: device.c 1.26 2002/10/07 16:21:46 kls Exp $ */ #include "device.h" @@ -87,6 +87,15 @@ int cDevice::NextCardIndex(int n) return nextCardIndex; } +int cDevice::DeviceNumber(void) const +{ + for (int i = 0; i < numDevices; i++) { + if (device[i] == this) + return i; + } + return -1; +} + void cDevice::MakePrimaryDevice(bool On) { } |