From 7e1e27954a398fce1cfdf11a9775bc81aba4fad1 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Mon, 20 May 2019 10:57:46 +0300
Subject: [PATCH] Call waitKey for left and right

---
 common/config/config.json    | 8 ++++++--
 renderer/cpp/src/display.cpp | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/common/config/config.json b/common/config/config.json
index fabeed003..b3f59fd2a 100644
--- a/common/config/config.json
+++ b/common/config/config.json
@@ -10,7 +10,10 @@
 			"nostereo": false,
 			"scale": 1.0,
 			"flip_vert": false,
-			"max_fps": 25
+			"max_fps": 25,
+			"width": 640,
+			"height": 480,
+			"crosshair": false
 		},
 		"calibrate": false,
 		"calibration": {
@@ -55,7 +58,8 @@
 			"points": true,
 			"depth": false,
 			"left": false,
-			"right": false
+			"right": false,
+			"crosshair": false
 		},
 		"net": {
 			"listen": "tcp://*:9001",
diff --git a/renderer/cpp/src/display.cpp b/renderer/cpp/src/display.cpp
index 671fc32a7..e9e08e9fc 100644
--- a/renderer/cpp/src/display.cpp
+++ b/renderer/cpp/src/display.cpp
@@ -202,7 +202,7 @@ void Display::wait(int ms) {
 		#endif  // HAVE_VIZ
 	}
 	
-	if (config_["disparity"]) {
+	if (config_["disparity"] || config_["left"] || config_["right"]) {
 		if(cv::waitKey(ms) == 27) {
 	        // exit if ESC is pressed
 	        active_ = false;
-- 
GitLab