diff --git a/applications/gui/src/camera.cpp b/applications/gui/src/camera.cpp index df514b2ffbf8e04bf5f68bbea77846c333eea03f..9aba01850bcc2b345e1a75463ad92fe2e49d28c7 100644 --- a/applications/gui/src/camera.cpp +++ b/applications/gui/src/camera.cpp @@ -276,9 +276,9 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) { name_ = "Virtual Camera"; // Do a draw if not active. If active the draw function will be called // directly. - //if (screen_->activeCamera() != this) { + if (screen_->activeCamera() != this) { _draw(fs); - //} + } } else { if (fid_ >= fs.frames.size()) return; frame = &fs.frames[fid_]; diff --git a/applications/gui/src/src_window.cpp b/applications/gui/src/src_window.cpp index cc1f2aa0aadc0e622e468fb548eddea9eaa067ba..01eaf3a178dd024e7009e3dad62e36c4a62ab520 100644 --- a/applications/gui/src/src_window.cpp +++ b/applications/gui/src/src_window.cpp @@ -125,6 +125,16 @@ SourceWindow::SourceWindow(ftl::gui::Screen *screen) return true; }); + ftl::timer::add(ftl::timer::kTimerMain, [this](int64_t ts) { + auto *c = screen_->activeCamera(); + // Only offer full framerate render on active camera. + if (c) { + UNIQUE_LOCK(frameset_.mtx,lk); + c->draw(frameset_); + } + return true; + }); + _updateCameras(screen_->control()->getNet()->findAll<string>("list_streams")); // Also check for a file on command line.