summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/facetracknoir.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-09-13 13:49:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-09-13 13:49:46 +0200
commitd31c12fa4bc85897da328287030cb10a6b0db5af (patch)
tree3eb47beb8a1025bc29549d3e5fa0eb089dd4686c /facetracknoir/facetracknoir.cpp
parent62d3351f62bc670edc95b4ecc7b17420e899ee26 (diff)
Allow for changing keyboard shortcuts while the tracker is running
Diffstat (limited to 'facetracknoir/facetracknoir.cpp')
-rw-r--r--facetracknoir/facetracknoir.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 2bc625cb..8224b35f 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -1278,6 +1278,21 @@ void FaceTrackNoIR::bindKeyboardShortcuts()
keyCenter.ctrl = iniFile.value("Ctrl_Center", false).toBool();
#endif
iniFile.endGroup ();
+
+ if (tracker) /* running already */
+ {
+#if defined(_WIN32) || defined(__WIN32)
+ if (keybindingWorker)
+ {
+ keybindingWorker->should_quit = true;
+ keybindingWorker->wait();
+ delete keybindingWorker;
+ keybindingWorker = NULL;
+ }
+ keybindingWorker = new KeybindingWorker(*this, keyCenter);
+ keybindingWorker->start();
+#endif
+ }
}
//