summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-08-22 12:02:12 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-08-22 12:02:12 +0200
commit6e6e468148e231156be0cccf1ecd3f6eab5b5970 (patch)
tree91ffb408e91c35af9090f05669055911e95d8352
parent1f0a55ca7d0f681999f9f1eb4c05be956e195e63 (diff)
downloadvdr-6e6e468148e231156be0cccf1ecd3f6eab5b5970.tar.gz
vdr-6e6e468148e231156be0cccf1ecd3f6eab5b5970.tar.bz2
cDevice::IsPrimaryDevice() now also checks whether the primary device actually has a decoder and returns false otherwise
-rw-r--r--HISTORY3
-rw-r--r--device.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index e8bb6ea0..0ab944f6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7821,3 +7821,6 @@ Video Disk Recorder Revision History
- Fixed handling LIRC events in case repeated events are lost.
- Fixed a possible crash when shutting down VDR while subtitles are being displayed
(reported by Ville Skyttä).
+- cDevice::IsPrimaryDevice() now also checks whether the primary device actually has
+ a decoder and returns false otherwise. This should improve device allocation on
+ systems that are only used as a receiver and don't actually display anything.
diff --git a/device.h b/device.h
index fd010d41..6ba5c38d 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 2.47 2013/02/16 15:20:01 kls Exp $
+ * $Id: device.h 2.47.1.1 2013/08/22 12:01:48 kls Exp $
*/
#ifndef __DEVICE_H
@@ -196,7 +196,7 @@ protected:
///< A derived class must call the MakePrimaryDevice() function of its
///< base class.
public:
- bool IsPrimaryDevice(void) const { return this == primaryDevice; }
+ bool IsPrimaryDevice(void) const { return this == primaryDevice && HasDecoder(); }
int CardIndex(void) const { return cardIndex; }
///< Returns the card index of this device (0 ... MAXDEVICES - 1).
int DeviceNumber(void) const;