We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe5a21f commit 189a90dCopy full SHA for 189a90d
GUI/main_window.cpp
@@ -216,13 +216,17 @@ void main_window::connect_kinect(bool checked)
216
217
const auto emptyFn = [](const NUI_SKELETON_FRAME&) {};
218
219
- std::function<void(const NUI_SKELETON_FRAME&)> newFrameCB = recordFrameFN;
+ std::function<void(const NUI_SKELETON_FRAME&)> newFrameCB = perFrameFN;
220
if (!ui.cbCaptureSkeleton->isChecked()) newFrameCB = emptyFn; //trinary operator not possible
221
222
m_kinect->set_new_point_callback(newFrameCB);
223
+ m_kinect->enable();
224
- while (!m_kinect->isOn())
225
- m_kinect->enable();
+ if (!m_kinect->isOn())
226
+ {
227
+ m_kinect.reset(nullptr);
228
+ return;
229
+ }
230
231
m_kinect->start_record();
232
ui.pbRecord->setEnabled(true);
0 commit comments