summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Ahrenberg <Rolf.Ahrenberg@sci.fi>2017-04-02 00:44:23 +0300
committerRolf Ahrenberg <Rolf.Ahrenberg@sci.fi>2017-04-02 00:44:23 +0300
commit02f2c2448269e8745e0eda5d952c9c34831b3867 (patch)
treef06e3f26bfceded1cc12d943a1f4a047f7ea43a4
parented1a78f2e12ae01e07ba8bf79f5e4e6bb6df736a (diff)
downloadvdr-plugin-osdteletext-02f2c2448269e8745e0eda5d952c9c34831b3867.tar.gz
vdr-plugin-osdteletext-02f2c2448269e8745e0eda5d952c9c34831b3867.tar.bz2
Changed APIVERSNUM checks into a bit robust ones.
-rw-r--r--display.c4
-rw-r--r--menu.c4
-rw-r--r--txtrecv.c4
-rw-r--r--txtrecv.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/display.c b/display.c
index 4b6fdfa..9f580a9 100644
--- a/display.c
+++ b/display.c
@@ -100,7 +100,7 @@ cDisplay32BPP::cDisplay32BPP(int x0, int y0, int width, int height)
setOutputWidth(width);
setOutputHeight(Height);
-#if APIVERSNUM >= 20107
+#if defined(APIVERSNUM) && APIVERSNUM >= 20107
Width = 480;
Height = 250;
#endif
@@ -161,7 +161,7 @@ void cDisplay32BPPHalf::InitOSD() {
setOutputWidth(width);
setOutputHeight(Height);
-#if APIVERSNUM >= 20107
+#if defined(APIVERSNUM) && APIVERSNUM >= 20107
Width = 480;
Height = 250;
#endif
diff --git a/menu.c b/menu.c
index 5044efa..081eecc 100644
--- a/menu.c
+++ b/menu.c
@@ -73,7 +73,7 @@ void TeletextBrowser::Show(void) {
}
bool TeletextBrowser::CheckIsValidChannel(int number) {
-#if APIVERSNUM >= 20301
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
LOCK_CHANNELS_READ;
return (Channels->GetByNumber(number) != 0);
#else
@@ -82,7 +82,7 @@ bool TeletextBrowser::CheckIsValidChannel(int number) {
}
void TeletextBrowser::ChannelSwitched(int ChannelNumber) {
-#if APIVERSNUM >= 20301
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
LOCK_CHANNELS_READ;
const cChannel *chan=Channels->GetByNumber(ChannelNumber);
#else
diff --git a/txtrecv.c b/txtrecv.c
index 281927e..23e0f4f 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -86,7 +86,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber, bool Li
// ignore if channel is invalid (highly unlikely, this will ever
// be the case, but defensive coding rules!)
-#if APIVERSNUM >= 20301
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
LOCK_CHANNELS_READ;
const cChannel* newLiveChannel = Channels->GetByNumber(ChannelNumber);
#else
@@ -152,7 +152,7 @@ void cTxtReceiver::Activate(bool On)
}
}
-#if APIVERSNUM >= 20301
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
void cTxtReceiver::Receive(const uchar *Data, int Length)
#else
void cTxtReceiver::Receive(uchar *Data, int Length)
diff --git a/txtrecv.h b/txtrecv.h
index 823f9ef..1ca29b8 100644
--- a/txtrecv.h
+++ b/txtrecv.h
@@ -56,7 +56,7 @@ private:
Storage *storage;
protected:
virtual void Activate(bool On);
-#if APIVERSNUM >= 20301
+#if defined(APIVERSNUM) && APIVERSNUM >= 20301
virtual void Receive(const uchar *Data, int Length);
#else
virtual void Receive(uchar *Data, int Length);