summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-14 06:29:34 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-14 06:30:05 +0200
commit168fc80717b5f0a21338d22a37e73539b969178e (patch)
treec9778a02d65876b7835302f578ee93072c884844 /tracker-wii
parent30378f88294c81bfc00b23cadfd7e292f29d8fe6 (diff)
tracker/wii: try fixing camera stop
It's still not enabled due to my lacking an actual Wii device.
Diffstat (limited to 'tracker-wii')
-rw-r--r--tracker-wii/wii_camera.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tracker-wii/wii_camera.cpp b/tracker-wii/wii_camera.cpp
index f6f8726f..1f769819 100644
--- a/tracker-wii/wii_camera.cpp
+++ b/tracker-wii/wii_camera.cpp
@@ -98,19 +98,20 @@ bool WIICamera::start(const QString&, int, int, int)
void WIICamera::stop()
{
- onExit = true;
- m_pDev->ChangedCallback = nullptr;
- m_pDev->Disconnect();
- Beep(1000, 200);
- if (m_pDev) {
- m_pDev=nullptr;
- m_pDev = nullptr;
- }
-
desired_name = QString();
active_name = QString();
cam_info = pt_camera_info();
cam_desired = pt_camera_info();
+ onExit = true;
+
+ if (m_pDev)
+ {
+ m_pDev->ChangedCallback = nullptr;
+ m_pDev->Disconnect();
+ m_pDev = nullptr;
+ }
+
+ Beep(1000, 200);
}