skip overlay processing when no overlay is specified

This commit is contained in:
gdzhu
2021-08-26 05:40:58 +01:00
parent 687a2eb91a
commit 7501f1846b
2 changed files with 7 additions and 2 deletions

View File

@@ -138,9 +138,14 @@ int main(int argc, char *argv[])
std::cout << "Rotation Time: " << rotationSeconds << std::endl;
std::cout << "Overlay input: " << overlay << std::endl;
}
Overlay o(overlay);
o.setDebugMode(debugMode);
w.setOverlay(&o);
if (!overlay.empty())
{
w.setOverlay(&o);
}
w.setAspect(aspect);
w.setDebugMode(debugMode);
w.setFitAspectAxisToWindow(fitAspectAxisToWindow);

View File

@@ -39,7 +39,7 @@ private:
bool debugMode = false;
bool fitAspectAxisToWindow = false;
Overlay* overlay;
Overlay* overlay = NULL;
void drawText(QPixmap& image, int margin, int fontsize, QString text, int alignment);