From 94093b9cda1d4655613cf348a3528d6b994e6801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 11 Mar 2012 15:55:28 +0200 Subject: Adapt to VDR >= 1.7.26 (Closes: #897). --- txtrecv.c | 14 ++++++++++---- txtrecv.h | 6 +++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/txtrecv.c b/txtrecv.c index 2321697..5c73a79 100644 --- a/txtrecv.c +++ b/txtrecv.c @@ -483,9 +483,16 @@ cTxtStatus::~cTxtStatus() delete receiver; } -void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber) +void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber +#if APIVERSNUM >= 10726 + , bool LiveView +#endif + ) { -#if VDRVERSNUM >= 10725 +#if APIVERSNUM < 10726 + bool LiveView = Device->IsPrimaryDevice(); +#endif +#if APIVERSNUM >= 10725 // Disconnect receiver if channel is 0, will reconnect to new // receiver after channel change. if (ChannelNumber == 0 && Device->IsPrimaryDevice()) @@ -501,8 +508,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber) if (newLiveChannel == NULL) return; // ignore non-live-channel-switching - if (!Device->IsPrimaryDevice() || - ChannelNumber != cDevice::CurrentChannel()) return; + if (!LiveView || ChannelNumber != cDevice::CurrentChannel()) return; // live channel was changed // now re-attach the receiver to the new live channel diff --git a/txtrecv.h b/txtrecv.h index 8e53daa..a111d0d 100644 --- a/txtrecv.h +++ b/txtrecv.h @@ -176,7 +176,11 @@ private: bool storeTopText; Storage* storage; protected: - virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber +#if APIVERSNUM >= 10726 + , bool LiveView +#endif + ); public: cTxtStatus(bool storeTopText, Storage* storage); ~cTxtStatus(); -- cgit v1.2.3