summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2012-03-11 15:55:28 +0200
committerVille Skyttä <ville.skytta@iki.fi>2012-03-11 15:55:28 +0200
commit94093b9cda1d4655613cf348a3528d6b994e6801 (patch)
tree3fc4c39b891232a4b03dce0e202ead5d495ff890
parente9367b3f702bf04bea0585e2b27962d63aebda1d (diff)
downloadvdr-plugin-osdteletext-94093b9cda1d4655613cf348a3528d6b994e6801.tar.gz
vdr-plugin-osdteletext-94093b9cda1d4655613cf348a3528d6b994e6801.tar.bz2
Adapt to VDR >= 1.7.26 (Closes: #897).
-rw-r--r--txtrecv.c14
-rw-r--r--txtrecv.h6
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();