diff options
-rw-r--r-- | textwindow.c | 4 | ||||
-rw-r--r-- | textwindow.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/textwindow.c b/textwindow.c index c999a52..5b5a911 100644 --- a/textwindow.c +++ b/textwindow.c @@ -7,6 +7,7 @@ cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin) pixmapBackground = NULL; pixmap = NULL; oldVidWinHeight = 0; + scaledWindow = false; } cNopacityTextWindow::~cNopacityTextWindow(void) { @@ -21,7 +22,7 @@ cNopacityTextWindow::~cNopacityTextWindow(void) { osd->DestroyPixmap(pixmap); pixmap = NULL; } - if (config.scalePicture == 2) + if ((config.scalePicture == 2) && scaledWindow) vidWin->SetHeight(oldVidWinHeight); } @@ -73,6 +74,7 @@ void cNopacityTextWindow::Action(void) { cRect availableRect(vidWin->X(), vidWin->Y(), vidWin->Width(), vidWin->Height() - geometry->Height()); cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(availableRect); vidWin->SetHeight(vidWinNew.Height()); + scaledWindow = true; } int border = 5; diff --git a/textwindow.h b/textwindow.h index ad9d7f5..9b08211 100644 --- a/textwindow.h +++ b/textwindow.h @@ -9,6 +9,7 @@ private: cRect *geometry; cRect *vidWin; int oldVidWinHeight; + bool scaledWindow; const char *text; cTextWrapper twText; bool CreatePixmap(int border); |