diff options
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 3 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index acf4daa0..b14d803a 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -6,6 +6,7 @@ */ #include "ftnoir_tracker_pt.h" +#include "opentrack/camera-names.hpp" #include <QHBoxLayout> #include <cmath> #include <QDebug> @@ -129,7 +130,7 @@ void Tracker::apply_settings() { qDebug()<<"Tracker:: Applying settings"; QMutexLocker lock(&mutex); - camera.set_device_index(s.cam_index); + camera.set_device_index(camera_name_to_index(s.camera_name)); camera.set_res(s.cam_res_x, s.cam_res_y); camera.set_fps(s.cam_fps); qDebug()<<"Tracker::apply ends"; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index 3486f234..6fa149ed 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -39,7 +39,7 @@ TrackerDialog::TrackerDialog() } #endif - tie_setting(s.cam_index, ui.camdevice_combo); + tie_setting(s.camera_name, ui.camdevice_combo); tie_setting(s.cam_res_x, ui.res_x_spin); tie_setting(s.cam_res_y, ui.res_y_spin); tie_setting(s.cam_fps, ui.fps_spin); diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h index 20ede0dd..fba755bd 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h @@ -15,8 +15,8 @@ using namespace options; struct settings : opts { - value<int> cam_index, - cam_res_x, + value<QString> camera_name; + value<int> cam_res_x, cam_res_y, cam_fps, threshold, @@ -38,7 +38,7 @@ struct settings : opts settings() : opts("tracker-pt"), - cam_index(b, "camera-index", 0), + camera_name(b, "camera-name", ""), cam_res_x(b, "camera-res-width", 640), cam_res_y(b, "camera-res-height", 480), cam_fps(b, "camera-fps", 30), |