summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-09-26 10:00:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-09-26 11:22:51 +0200
commitd0a3b0a85c50c7c746b8ef17af19f4e88dfdf895 (patch)
tree429cd3f90a4666487f1897e38677f80a89dc01f5 /tracker-wii
parent5ba58e31d177a9cfa6d2c48a674ce295fdcd248a (diff)
tracker/{pt,wii}: fix awkward pt_preview::operator=
Diffstat (limited to 'tracker-wii')
-rw-r--r--tracker-wii/wii_frame.cpp7
-rw-r--r--tracker-wii/wii_frame.hpp2
2 files changed, 2 insertions, 7 deletions
diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp
index 8f18f4b8..fcde5235 100644
--- a/tracker-wii/wii_frame.cpp
+++ b/tracker-wii/wii_frame.cpp
@@ -17,7 +17,7 @@
using namespace pt_module;
-WIIPreview& WIIPreview::operator=(const pt_frame& frame_)
+void WIIPreview::set_last_frame(const pt_frame& frame_)
{
const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii;
const cv::Mat& frame = frame_.as_const<const WIIFrame>()->mat;
@@ -25,18 +25,13 @@ WIIPreview& WIIPreview::operator=(const pt_frame& frame_)
status = wii.status;
if (frame.channels() != 3)
- {
eval_once(qDebug() << "tracker/pt: camera frame depth: 3 !=" << frame.channels());
- return *this;
- }
const bool need_resize = frame.cols != frame_out.cols || frame.rows != frame_out.rows;
if (need_resize)
cv::resize(frame, frame_copy, cv::Size(frame_out.cols, frame_out.rows), 0, 0, cv::INTER_NEAREST);
else
frame.copyTo(frame_copy);
-
- return *this;
}
WIIPreview::WIIPreview(int w, int h)
diff --git a/tracker-wii/wii_frame.hpp b/tracker-wii/wii_frame.hpp
index 5d6dd199..a7688b80 100644
--- a/tracker-wii/wii_frame.hpp
+++ b/tracker-wii/wii_frame.hpp
@@ -47,7 +47,7 @@ struct WIIPreview final : pt_preview
{
WIIPreview(int w, int h);
- WIIPreview& operator=(const pt_frame& frame) override;
+ void set_last_frame(const pt_frame& frame) override;
QImage get_bitmap() override;
void draw_head_center(f x, f y) override;