From 3c20bf87becd03e85151e4c6b8d5ff0cc5651980 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sun, 11 Mar 2012 19:17:17 +0100 Subject: added support for >= VDR 1.7.26 (modified API) --- state.c | 10 +++++++--- state.h | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/state.c b/state.c index 3a0e00b..23be6d1 100644 --- a/state.c +++ b/state.c @@ -90,12 +90,16 @@ cGraphLCDState::~cGraphLCDState() { } -void cGraphLCDState::ChannelSwitch(const cDevice * Device, int ChannelNumber) -{ +#if VDRVERSNUM >= 10726 +void cGraphLCDState::ChannelSwitch(const cDevice * Device, int ChannelNumber, bool LiveView) { +#else +void cGraphLCDState::ChannelSwitch(const cDevice * Device, int ChannelNumber) { + bool LiveView = Device->IsPrimaryDevice() && !EITScanner.UsesDevice(Device); +#endif //printf("graphlcd plugin: cGraphLCDState::ChannelSwitch %d %d\n", Device->CardIndex(), ChannelNumber); if (GraphLCDSetup.PluginActive) { - if (ChannelNumber > 0 && Device->IsPrimaryDevice() && !EITScanner.UsesDevice(Device)) + if (ChannelNumber > 0 && LiveView) { if (ChannelNumber == cDevice::CurrentChannel()) { diff --git a/state.h b/state.h index e8b9768..67cdb66 100644 --- a/state.h +++ b/state.h @@ -4,7 +4,7 @@ * state.h - status monitor class * * (c) 2001-2004 Carsten Siebholz - * (c) 2010 Wolfgang Astleitner + * (c) 2010-2012 Wolfgang Astleitner **/ #ifndef _GRAPHLCD_STATE_H_ @@ -128,7 +128,11 @@ private: void UpdateEventInfo(void); void UpdateReplayInfo(void); protected: +#if VDRVERSNUM >= 10726 + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); +#else virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); +#endif virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); virtual void SetVolume(int Volume, bool Absolute); -- cgit v1.2.3