summaryrefslogtreecommitdiff
path: root/textwindow.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-01-30 16:09:53 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-01-30 16:12:07 +0100
commiteb27219c96a2fe5419289c84b1930f3e71ada54b (patch)
tree9a2926f95cb063ee2fb08f9abbad4b4cde3813c1 /textwindow.c
parent82a98f8e130418eb98cf4a2adac7806619d0ccb8 (diff)
downloadskin-nopacity-eb27219c96a2fe5419289c84b1930f3e71ada54b.tar.gz
skin-nopacity-eb27219c96a2fe5419289c84b1930f3e71ada54b.tar.bz2
An info display error in the recording menu has been fixed when menu = narrow and no banner
Diffstat (limited to 'textwindow.c')
-rw-r--r--textwindow.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/textwindow.c b/textwindow.c
index 7e46714..6924089 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -81,25 +81,26 @@ bool cNopacityTextWindow::SetManualPoster(const cRecording *recording, bool full
void cNopacityTextWindow::SetPoster(const cEvent *event, const cRecording *recording, bool fullscreen) {
if (!event && !recording)
return;
+ hasPoster = false;
+ posterHeight = 0;
+ posterWidth = 0;
static cPlugin *pScraper = GetScraperPlugin();
if (pScraper) {
posterScraper2Vdr.event = event;
posterScraper2Vdr.recording = recording;
if (pScraper->Service("GetPoster", &posterScraper2Vdr)) {
- hasPoster = true;
int posterWidthOrig = posterScraper2Vdr.poster.width;
int posterHeightOrig = posterScraper2Vdr.poster.height;
- if (!fullscreen) {
- posterHeight = geometry->Height() - 5;
- posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
- } else {
- posterWidth = geometry->Width() / 4;
- posterHeight = posterHeightOrig * ((double)posterWidth / (double)posterWidthOrig);
+ if (!(posterWidthOrig == 0 || posterHeightOrig == 0)) {
+ if (!fullscreen) {
+ posterHeight = geometry->Height() - 5;
+ posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
+ } else {
+ posterWidth = geometry->Width() / 4;
+ posterHeight = posterHeightOrig * ((double)posterWidth / (double)posterWidthOrig);
+ }
+ hasPoster = true;
}
- } else {
- hasPoster = false;
- posterHeight = 0;
- posterWidth = 0;
}
}
}
@@ -120,7 +121,7 @@ bool cNopacityTextWindow::SetTextScroller(int border, int left) {
}
} else {
cTextWrapper test;
- int widthTall = geometry->Width() - 2*border - left;
+ int widthTall = geometry->Width() - 2 * border - left;
test.Set(*text, font, widthTall);
int linesTotal = test.Lines();
int textHeight = linesTotal * lineHeight;