3636#include < libfreenect2/frame_listener_impl.h>
3737#include < libfreenect2/threading.h>
3838
39- bool shutdown = false ;
39+ bool protonect_shutdown = false ;
4040
4141void sigint_handler (int s)
4242{
43- shutdown = true ;
43+ protonect_shutdown = true ;
4444}
4545
4646int main (int argc, char *argv[])
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
6767 }
6868
6969 signal (SIGINT,sigint_handler);
70- shutdown = false ;
70+ protonect_shutdown = false ;
7171
7272 libfreenect2::SyncMultiFrameListener listener (libfreenect2::Frame::Color | libfreenect2::Frame::Ir | libfreenect2::Frame::Depth);
7373 libfreenect2::FrameMap frames;
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
7979 std::cout << " device serial: " << dev->getSerialNumber () << std::endl;
8080 std::cout << " device firmware: " << dev->getFirmwareVersion () << std::endl;
8181
82- while (!shutdown )
82+ while (!protonect_shutdown )
8383 {
8484 listener.waitForNewFrame (frames);
8585 libfreenect2::Frame *rgb = frames[libfreenect2::Frame::Color];
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
9191 cv::imshow (" depth" , cv::Mat (depth->height , depth->width , CV_32FC1, depth->data ) / 4500 .0f );
9292
9393 int key = cv::waitKey (1 );
94- shutdown = shutdown || (key > 0 && ((key & 0xFF ) == 27 )); // shutdown on escape
94+ protonect_shutdown = protonect_shutdown || (key > 0 && ((key & 0xFF ) == 27 )); // shutdown on escape
9595
9696 listener.release (frames);
9797 // libfreenect2::this_thread::sleep_for(libfreenect2::chrono::milliseconds(100));
0 commit comments