summaryrefslogtreecommitdiff
path: root/lcarsng.c
diff options
context:
space:
mode:
authorKarl Melscher <kamel5@gmx.net>2018-03-07 15:12:55 +0100
committerKarl Melscher <kamel5@gmx.net>2018-03-07 15:12:55 +0100
commita14627a4c06e2c78b29100f2b57ee3b148532946 (patch)
treec4788bbe0ea32843c0ed26168b9fdcbbaaf7adb7 /lcarsng.c
parent50ca477a3ec610db3090310983d4ff96c194d850 (diff)
downloadskin-lcarsng-a14627a4c06e2c78b29100f2b57ee3b148532946.tar.gz
skin-lcarsng-a14627a4c06e2c78b29100f2b57ee3b148532946.tar.bz2
GetOSDSize for VideoSize / Support VDR > 2.1.1 (sat-position)
Diffstat (limited to 'lcarsng.c')
-rw-r--r--lcarsng.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/lcarsng.c b/lcarsng.c
index 4130e0c..2ea2f9e 100644
--- a/lcarsng.c
+++ b/lcarsng.c
@@ -27,7 +27,9 @@
#include <vdr/font.h>
#include <vdr/menu.h>
#include <vdr/osd.h>
+#if APIVERSNUM > 20101
#include <vdr/positioner.h>
+#endif
#include <vdr/themes.h>
#include <vdr/videodir.h>
@@ -302,6 +304,7 @@ static void DrawDeviceSignal(cOsd *Osd, const cDevice *Device, int x0, int y0, i
}
}
+#if APIVERSNUM > 20101
static void DrawDevicePosition(cOsd *Osd, const cPositioner *Positioner, int x0, int y0, int x1, int y1, int &LastCurrent)
{
int HorizonLeft = Positioner->HorizonLongitude(cPositioner::pdLeft);
@@ -339,6 +342,7 @@ static void DrawDevicePosition(cOsd *Osd, const cPositioner *Positioner, int x0,
Osd->DrawEllipse(t, y0, t + d, y1 - 1, ColorMove, 5);
LastCurrent = c;
}
+#endif
// --- cLCARSNGDisplayChannel ----------------------------------------------
@@ -378,7 +382,9 @@ public:
virtual void SetChannel(const cChannel *Channel, int Number);
virtual void SetEvents(const cEvent *Present, const cEvent *Following);
virtual void SetMessage(eMessageType Type, const char *Text);
+#if APIVERSNUM > 20101
virtual void SetPositioner(const cPositioner *Positioner);
+#endif
virtual void Flush(void);
};
@@ -643,6 +649,7 @@ void cLCARSNGDisplayChannel::SetMessage(eMessageType Type, const char *Text)
}
}
+#if APIVERSNUM > 20101
void cLCARSNGDisplayChannel::SetPositioner(const cPositioner *Positioner)
{
if (Positioner) {
@@ -656,6 +663,7 @@ void cLCARSNGDisplayChannel::SetPositioner(const cPositioner *Positioner)
}
return;
}
+#endif
void cLCARSNGDisplayChannel::Flush(void)
{
@@ -961,13 +969,6 @@ cLCARSNGDisplayMenu::cLCARSNGDisplayMenu(void)
yd02 = yd03 - r; //0.85 * r; // Button in der Mitte
yd01 = yd02 - Gap;
-// yi00 = yt02;
-// yi01 = yb13;
-// xi00 = xa03;
-// xi01 = xa07;
-// xi02 = xa08;
-// xi03 = xa09;
-
xs = 0;
osd = CreateOsd(cOsd::OsdLeft(), cOsd::OsdTop(), xa00, yt00, xa09 - 1, yb15 - 1);
@@ -1850,9 +1851,15 @@ const cFont *cLCARSNGDisplayMenu::GetTextAreaFont(bool FixedFont) const
void cLCARSNGDisplayMenu::Flush(void)
{
- int xrand = (1920 - xa09) / 2;
- int yrand = (1080 - yb15) / 2;
+ int Width;
+ int Height;
+ double Aspect;
+// int xrand = (1920 - xa09) / 2;
+// int yrand = (1080 - yb15) / 2;
cDevice *Device = cDevice::PrimaryDevice();
+ cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect);
+ int xrand = (Width - xa09) / 2;
+ int yrand = (Height - yb15) / 2;
// cRect videoWindowRect( 0.575 * xa09, lineHeight, 0.44 * xa09, yc06 - lineHeight / 2);
cRect videoWindowRect( xs00 + xrand, yrand + Gap, xs11 - xs00, yc05 - yrand / 2);
DrawFrameDisplay();