]> git.sesse.net Git - nageru/blobdiff - futatabi/mainwindow.cpp
Use get_pkgconfig_variable() instead of calling pkg-config manually.
[nageru] / futatabi / mainwindow.cpp
index 8982b5f369142d0c21c32017fc8554af1358dbe9..38a50df371886d4045a31993e5fa93ae19699061 100644 (file)
@@ -181,11 +181,11 @@ MainWindow::MainWindow()
                this, &MainWindow::clip_list_selection_changed);
 
        // Find out how many cameras we have in the existing frames;
-       // if none, we start with a single camera.
-       num_cameras = 1;
+       // if none, we start with two cameras.
+       num_cameras = 2;
        {
                lock_guard<mutex> lock(frame_mu);
-               for (size_t stream_idx = 1; stream_idx < MAX_STREAMS; ++stream_idx) {
+               for (size_t stream_idx = 2; stream_idx < MAX_STREAMS; ++stream_idx) {
                        if (!frames[stream_idx].empty()) {
                                num_cameras = stream_idx + 1;
                        }
@@ -1012,7 +1012,7 @@ void MainWindow::quality_toggled(int quality, bool checked)
 void MainWindow::highlight_camera_input(int stream_idx)
 {
        for (unsigned i = 0; i < num_cameras; ++i) {
-               if (stream_idx == i) {
+               if (unsigned(stream_idx) == i) {
                        displays[i].frame->setStyleSheet("background: rgb(0,255,0)");
                } else {
                        displays[i].frame->setStyleSheet("");