diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-20 09:33:56 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-20 09:33:56 +0200 |
commit | ba0cd4a1fd743a7d0d025ca76c211c8f466e6879 (patch) | |
tree | 2bbd5f1939a7413e76cbe782e3da7b7c844cea8c /facetracknoir/facetracknoir.cpp | |
parent | 7f0d0d1b9ef7711a4f1835b0120f014799b71e90 (diff) |
refactor 2/n
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index c547f608..5170498c 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -199,7 +199,7 @@ void FaceTrackNoIR::updateButtonState(bool running, bool inertialp) void FaceTrackNoIR::bindKeyboardShortcuts() { if (work) - work->sc = std::make_shared<Shortcuts>(); + work->sc = std::make_shared<Shortcuts>(winId()); } void FaceTrackNoIR::startTracker( ) { @@ -211,7 +211,7 @@ void FaceTrackNoIR::startTracker( ) { work = nullptr; libs = SelectedLibraries(ui.video_frame, current_tracker(), current_protocol(), current_filter()); - work = std::make_shared<Work>(s, pose, libs, this); + work = std::make_shared<Work>(s, pose, libs, this, winId()); { double p[6] = {0,0,0, 0,0,0}; @@ -227,11 +227,6 @@ void FaceTrackNoIR::startTracker( ) { return; } -#if defined(_WIN32) - keybindingWorker = new KeybindingWorker(*this, keyCenter, keyToggle); - keybindingWorker->start(); -#endif - ui.video_frame->show(); timUpdateHeadPose.start(50); @@ -243,15 +238,7 @@ void FaceTrackNoIR::startTracker( ) { void FaceTrackNoIR::stopTracker( ) { ui.game_name->setText("Not connected"); -#if defined(_WIN32) - if (keybindingWorker) - { - keybindingWorker->should_quit = true; - keybindingWorker->wait(); - delete keybindingWorker; - keybindingWorker = NULL; - } -#endif + timUpdateHeadPose.stop(); ui.pose_display->rotateBy(0, 0, 0); |