diff options
Diffstat (limited to 'tracker-pt/camera.cpp')
-rw-r--r-- | tracker-pt/camera.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index c995c11b..85a5a93b 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -9,9 +9,14 @@ #include <string> #include <QDebug> #include "opentrack-compat/sleep.hpp" +#include "opentrack-compat/camera-names.hpp" -void Camera::set_device_index(int index) +void Camera::set_device(const QString& name) { + const int index = camera_name_to_index(name); + + desired_name = name; + if (desired_index != index) { desired_index = index; @@ -24,6 +29,11 @@ void Camera::set_device_index(int index) } } +QString Camera::get_desired_name() const +{ + return desired_name; +} + void Camera::set_fps(int fps) { if (cam_desired.fps != fps) |