From 17b12a32b049ab8979c56572c9c5ae9b23227e68 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 22 Aug 2013 12:00:03 +0200 Subject: [PATCH] cDevice::IsPrimaryDevice() now also checks whether the primary device actually has a decoder and returns false otherwise --- HISTORY | 3 +++ device.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index f48a99d2..5700c236 100644 --- a/HISTORY +++ b/HISTORY @@ -7874,3 +7874,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 5c334490..d4d50d40 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 3.1 2013/06/01 11:35:23 kls Exp $ + * $Id: device.h 3.2 2013/08/22 11:57:34 kls Exp $ */ #ifndef __DEVICE_H @@ -197,7 +197,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;