diff options
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r-- | src/qcam/main_window.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 33fde8b1..ef4ad4a2 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -21,7 +21,7 @@ using namespace libcamera; -MainWindow::MainWindow(const OptionsParser::Options &options) +MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options) : options_(options), isCapturing_(false) { int ret; @@ -35,7 +35,7 @@ MainWindow::MainWindow(const OptionsParser::Options &options) viewfinder_->setFixedSize(500, 500); adjustSize(); - ret = openCamera(); + ret = openCamera(cm); if (!ret) ret = startCapture(); @@ -66,9 +66,8 @@ void MainWindow::updateTitle() setWindowTitle(title_ + " : " + QString::number(fps, 'f', 2) + " fps"); } -int MainWindow::openCamera() +int MainWindow::openCamera(CameraManager *cm) { - CameraManager *cm = CameraManager::instance(); std::string cameraName; if (!options_.isSet(OptCamera)) { |