summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--displaymenu.c1
-rw-r--r--textwindow.c25
2 files changed, 16 insertions, 10 deletions
diff --git a/displaymenu.c b/displaymenu.c
index e1b08e1..26382f0 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -744,6 +744,7 @@ void cNopacityDisplayMenu::Flush(void) {
initMenu = false;
initial = false;
osd->Flush();
+ //esyslog("nopacity: scaling to x: %d, y: %d, width: %d, height: %d", videoWindowRect.X(), videoWindowRect.Y(), videoWindowRect.Width(), videoWindowRect.Height());
cDevice::PrimaryDevice()->ScaleVideo(videoWindowRect);
}
diff --git a/textwindow.c b/textwindow.c
index 04ea9b4..71e020e 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -22,10 +22,13 @@ cNopacityTextWindow::~cNopacityTextWindow(void) {
pixmap = NULL;
}
if ((config.scalePicture == 2) && scaledWindow) {
- vidWin->SetX(oldVidWin.X());
- vidWin->SetY(oldVidWin.Y());
- vidWin->SetWidth(oldVidWin.Width());
- vidWin->SetHeight(oldVidWin.Height());
+ cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(oldVidWin);
+ if (vidWinNew != cRect::Null) {
+ vidWin->SetX(vidWinNew.X());
+ vidWin->SetY(vidWinNew.Y());
+ vidWin->SetWidth(vidWinNew.Width());
+ vidWin->SetHeight(vidWinNew.Height());
+ }
}
}
@@ -73,17 +76,19 @@ void cNopacityTextWindow::Action(void) {
DoSleep(config.menuInfoTextDelay*1000);
if (config.scalePicture == 2) {
- cRect availableRect(vidWin->X(), vidWin->Y(), vidWin->Width(), vidWin->Height() - geometry->Height());
oldVidWin.SetX(vidWin->X());
oldVidWin.SetY(vidWin->Y());
oldVidWin.SetWidth(vidWin->Width());
oldVidWin.SetHeight(vidWin->Height());
+ cRect availableRect(vidWin->X(), vidWin->Y(), vidWin->Width(), vidWin->Height() - geometry->Height());
cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(availableRect);
- vidWin->SetX(vidWinNew.X());
- vidWin->SetY(vidWinNew.Y());
- vidWin->SetWidth(vidWinNew.Width());
- vidWin->SetHeight(vidWinNew.Height());
- scaledWindow = true;
+ if (vidWinNew != cRect::Null) {
+ vidWin->SetX(vidWinNew.X());
+ vidWin->SetY(vidWinNew.Y());
+ vidWin->SetWidth(vidWinNew.Width());
+ vidWin->SetHeight(vidWinNew.Height());
+ scaledWindow = true;
+ }
}
int border = 5;