Commit 69cea0e8 authored by Thiago Santini's avatar Thiago Santini

Freezes preview instead of toggling widgets

parent 79027ce8
......@@ -2,6 +2,8 @@ QT += core gui multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++14
TOP = $$PWD
TARGET = EyeRecToo
......
......@@ -379,7 +379,10 @@ void CameraWidget::validatePoint(QPointF &point)
bool CameraWidget::shouldUpdate(Timestamp t)
{
if (!this->isVisible())
return false;
return false;
if (gFreezePreview)
return false;
/* TODO: Right now, we don't update every frame to save resources.
* Make this parametrizable or move to faster drawing methods.
......
......@@ -597,7 +597,5 @@ void MainWindow::toggleRecording()
void MainWindow::togglePreview()
{
ui->fieldCam->click();
ui->leftEyeCam->click();
ui->rightEyeCam->click();
gFreezePreview = !gFreezePreview;
}
......@@ -24,6 +24,7 @@ std::vector<QString> gLogBuffer;
PerformanceMonitor gPerformanceMonitor;
bool gCalibrating = false;
bool gFreezePreview = false;
/*
* Utility functions
......
......@@ -112,5 +112,6 @@ extern std::vector<QString> gLogBuffer;
extern PerformanceMonitor gPerformanceMonitor;
extern bool gCalibrating;
extern bool gFreezePreview;
#endif // UTILS_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment