summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-wii')
-rw-r--r--tracker-wii/wii_point_extractor.cpp7
-rw-r--r--tracker-wii/wii_point_extractor.h5
2 files changed, 9 insertions, 3 deletions
diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp
index 393dc1c9..5e860c14 100644
--- a/tracker-wii/wii_point_extractor.cpp
+++ b/tracker-wii/wii_point_extractor.cpp
@@ -100,12 +100,15 @@ void WIIPointExtractor::draw_bg(cv::Mat& preview_frame, const struct wii_info& w
1);
}
-void WIIPointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_frame_, std::vector<vec2>& points)
+void WIIPointExtractor::extract_points(const pt_frame& frame_,
+ pt_preview& preview_frame_,
+ bool preview_visible,
+ std::vector<vec2>& points)
{
const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii;
cv::Mat& preview_frame = *preview_frame_.as<WIIPreview>();
- if (wii.status == wii_cam_data_change)
+ if (preview_visible && wii.status == wii_cam_data_change)
{
draw_bg(preview_frame, wii);
draw_points(preview_frame, wii, points);
diff --git a/tracker-wii/wii_point_extractor.h b/tracker-wii/wii_point_extractor.h
index 4208f1b2..4a6f038b 100644
--- a/tracker-wii/wii_point_extractor.h
+++ b/tracker-wii/wii_point_extractor.h
@@ -23,7 +23,10 @@ class WIIPointExtractor final : public pt_point_extractor
public:
// extracts points from frame and draws some processing info into frame, if draw_output is set
// dt: time since last call in seconds
- void extract_points(const pt_frame& frame, pt_preview& preview_frame, std::vector<vec2>& points) override;
+ void extract_points(const pt_frame& frame,
+ pt_preview& preview_frame,
+ bool preview_visible,
+ std::vector<vec2>& points) override;
WIIPointExtractor(const QString& module_name);
private: