diff options
-rw-r--r-- | tracker-kinect-face/camera_kinect_ir.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tracker-kinect-face/camera_kinect_ir.cpp b/tracker-kinect-face/camera_kinect_ir.cpp index b881d51f..4d442bf2 100644 --- a/tracker-kinect-face/camera_kinect_ir.cpp +++ b/tracker-kinect-face/camera_kinect_ir.cpp @@ -36,7 +36,12 @@ namespace Kinect { std::vector<QString> CamerasProvider::camera_names() const { - return { KKinectIRSensor }; + IKinectSensor* ptr; + BOOLEAN b; + if (SUCCEEDED(GetDefaultKinectSensor(&ptr)) && SUCCEEDED(ptr->get_IsAvailable(&b)) && b) + return { KKinectIRSensor }; + else + return {}; } bool CamerasProvider::can_show_dialog(const QString& camera_name) |