From 5f79303e3226d6d2272aa34d819d2888712f70ac Mon Sep 17 00:00:00 2001 From: Graham Reeves Date: Wed, 31 Mar 2021 12:51:43 +0100 Subject: [PATCH] Fixed colour stream not (re)starting properly --- Source/Freenect.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Freenect.cpp b/Source/Freenect.cpp index b2f877e..d9a8fd6 100755 --- a/Source/Freenect.cpp +++ b/Source/Freenect.cpp @@ -441,6 +441,7 @@ void Freenect::TDevice::Close() mDepthMode.is_valid = false; Result = freenect_stop_video( mDevice ); + mColourMode.is_valid = false; Result = freenect_close_device( mDevice ); IsOkay( Result, "freenect_close_device" ); @@ -517,6 +518,7 @@ void Freenect::TDevice::EnableDepthStream(SoyPixelsMeta Meta) //freenect_stop_depth( &Device ); Result = freenect_start_depth( mDevice ); Freenect::IsOkay( Result, "freenect_start_depth" ); + std::Debug << __PRETTY_FUNCTION__ << " Started depth stream" << std::endl; mDepthFormat = Meta; } @@ -545,7 +547,8 @@ void Freenect::TDevice::EnableColourStream(SoyPixelsMeta Meta) //freenect_stop_depth( &Device ); Result = freenect_start_video( mDevice ); Freenect::IsOkay( Result, "freenect_start_color" ); - + std::Debug << __PRETTY_FUNCTION__ << " Started colour stream" << std::endl; + mColourFormat = Meta; }