start timer only after ui init

old-commit-hash: 06b974512af7e5d5a0bead72f3c4ebe32f9d1815
This commit is contained in:
Willem Melching
2021-01-19 12:43:39 +01:00
parent 42b958f0f0
commit 8e13e2976e
+1 -1
View File
@@ -192,7 +192,6 @@ static void set_backlight(int brightness) {
GLWindow::GLWindow(QWidget* parent) : QOpenGLWidget(parent) {
timer = new QTimer(this);
timer->start(1000 / UI_FREQ);
QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timerUpdate()));
backlight_timer = new QTimer(this);
@@ -224,6 +223,7 @@ void GLWindow::initializeGL() {
wake();
timer->start(1000 / UI_FREQ);
backlight_timer->start(BACKLIGHT_DT * 1000);
}